From abe50e50bd23f3ce6ebfe89b7ff374d3d1809f7a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Sep 2024 16:34:06 +0000 Subject: [PATCH 1/2] feat: add fields and the BackupType proto for Hot Backups docs: clarify comments and fix typos PiperOrigin-RevId: 658791576 Source-Link: https://github.com/googleapis/googleapis/commit/c93b54fa3060c7185f6dc724f0f9ec0c12bc44fc Source-Link: https://github.com/googleapis/googleapis-gen/commit/e52ba38a95a82f7588d0dd3a2284c98850dab9e1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTUyYmEzOGE5NWE4MmY3NTg4ZDBkZDNhMjI4NGM5ODg1MGRhYjllMSJ9 feat: add MergeToCell to Mutation APIs PiperOrigin-RevId: 654025780 Source-Link: https://github.com/googleapis/googleapis/commit/9effffdf94e20cafb0beeada3727abfff2a32346 Source-Link: https://github.com/googleapis/googleapis-gen/commit/28db5a5df7c4c24adb3b01086c3db2af976241b3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjhkYjVhNWRmN2M0YzI0YWRiM2IwMTA4NmMzZGIyYWY5NzYyNDFiMyJ9 feat: Add min, max, hll aggregators and more types docs: Corrected various type documentation PiperOrigin-RevId: 654022916 Source-Link: https://github.com/googleapis/googleapis/commit/157e3bf69c47a280139758ffe59f19834679ec5e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f781685ad52d58b198baf95fa120d87877b3e46e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjc4MTY4NWFkNTJkNThiMTk4YmFmOTVmYTEyMGQ4Nzg3N2IzZTQ2ZSJ9 feat: update Go Datastore import path feat: update Go Bigtable import path PiperOrigin-RevId: 651776284 Source-Link: https://github.com/googleapis/googleapis/commit/b8eed55ae5a9bf62d0cdb90b10b92dc06c37cd12 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9d7fe2c488e87671e686e3a19aa8cf4f071e806a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWQ3ZmUyYzQ4OGU4NzY3MWU2ODZlM2ExOWFhOGNmNGYwNzFlODA2YSJ9 feat: publish ProtoRows Message This is needed to parse ExecuteQuery responses PiperOrigin-RevId: 651386373 Source-Link: https://github.com/googleapis/googleapis/commit/a5be6fa5ff1603b2cab067408e2640d270f0e300 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d467ce893a04c41e504983346c215d41fd263650 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDQ2N2NlODkzYTA0YzQxZTUwNDk4MzM0NmMyMTVkNDFmZDI2MzY1MCJ9 feat: publish the Cloud Bigtable ExecuteQuery API The ExecuteQuery API will allow users to query Bigtable using SQL PiperOrigin-RevId: 650660213 Source-Link: https://github.com/googleapis/googleapis/commit/f681f79a93814d8b974da9dd8cdc62228d0f4758 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3180845487136794952b8f365fe6c6868999d9c0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzE4MDg0NTQ4NzEzNjc5NDk1MmI4ZjM2NWZlNmM2ODY4OTk5ZDljMCJ9 --- owl-bot-staging/admin/v2/.eslintignore | 7 + owl-bot-staging/admin/v2/.eslintrc.json | 3 + owl-bot-staging/admin/v2/.gitignore | 14 + owl-bot-staging/admin/v2/.jsdoc.js | 55 + owl-bot-staging/admin/v2/.mocharc.js | 33 + owl-bot-staging/admin/v2/.prettierrc.js | 22 + owl-bot-staging/admin/v2/README.md | 1 + owl-bot-staging/admin/v2/package.json | 59 + .../admin/v2/bigtable_instance_admin.proto | 751 + .../admin/v2/bigtable_table_admin.proto | 1434 + .../google/bigtable/admin/v2/common.proto | 54 + .../google/bigtable/admin/v2/instance.proto | 414 + .../google/bigtable/admin/v2/table.proto | 581 + .../google/bigtable/admin/v2/types.proto | 294 + owl-bot-staging/admin/v2/protos/protos.d.ts | 24392 +++++++ owl-bot-staging/admin/v2/protos/protos.js | 60034 ++++++++++++++++ owl-bot-staging/admin/v2/protos/protos.json | 6161 ++ ...table_instance_admin.create_app_profile.js | 79 + .../bigtable_instance_admin.create_cluster.js | 76 + ...bigtable_instance_admin.create_instance.js | 85 + ...table_instance_admin.delete_app_profile.js | 68 + .../bigtable_instance_admin.delete_cluster.js | 62 + ...bigtable_instance_admin.delete_instance.js | 62 + ...bigtable_instance_admin.get_app_profile.js | 62 + .../v2/bigtable_instance_admin.get_cluster.js | 62 + .../bigtable_instance_admin.get_iam_policy.js | 67 + .../bigtable_instance_admin.get_instance.js | 62 + ...gtable_instance_admin.list_app_profiles.js | 81 + .../bigtable_instance_admin.list_clusters.js | 69 + ...igtable_instance_admin.list_hot_tablets.js | 92 + .../bigtable_instance_admin.list_instances.js | 66 + ...e_instance_admin.partial_update_cluster.js | 68 + ..._instance_admin.partial_update_instance.js | 68 + .../bigtable_instance_admin.set_iam_policy.js | 77 + ...ble_instance_admin.test_iam_permissions.js | 70 + ...table_instance_admin.update_app_profile.js | 72 + .../bigtable_instance_admin.update_cluster.js | 95 + ...bigtable_instance_admin.update_instance.js | 102 + .../bigtable_table_admin.check_consistency.js | 80 + .../v2/bigtable_table_admin.copy_backup.js | 94 + ...able_table_admin.create_authorized_view.js | 77 + .../v2/bigtable_table_admin.create_backup.js | 79 + .../v2/bigtable_table_admin.create_table.js | 91 + ..._table_admin.create_table_from_snapshot.js | 77 + ...able_table_admin.delete_authorized_view.js | 70 + .../v2/bigtable_table_admin.delete_backup.js | 63 + .../bigtable_table_admin.delete_snapshot.js | 63 + .../v2/bigtable_table_admin.delete_table.js | 63 + .../v2/bigtable_table_admin.drop_row_range.js | 72 + ..._table_admin.generate_consistency_token.js | 63 + ...igtable_table_admin.get_authorized_view.js | 68 + .../v2/bigtable_table_admin.get_backup.js | 63 + .../v2/bigtable_table_admin.get_iam_policy.js | 67 + .../v2/bigtable_table_admin.get_snapshot.js | 63 + .../v2/bigtable_table_admin.get_table.js | 68 + ...table_table_admin.list_authorized_views.js | 84 + .../v2/bigtable_table_admin.list_backups.js | 131 + .../v2/bigtable_table_admin.list_snapshots.js | 76 + .../v2/bigtable_table_admin.list_tables.js | 83 + ...able_table_admin.modify_column_families.js | 75 + .../v2/bigtable_table_admin.restore_table.js | 76 + .../v2/bigtable_table_admin.set_iam_policy.js | 77 + .../v2/bigtable_table_admin.snapshot_table.js | 90 + ...gtable_table_admin.test_iam_permissions.js | 70 + .../v2/bigtable_table_admin.undelete_table.js | 64 + ...able_table_admin.update_authorized_view.js | 80 + .../v2/bigtable_table_admin.update_backup.js | 73 + .../v2/bigtable_table_admin.update_table.js | 77 + ...pet_metadata_google.bigtable.admin.v2.json | 2395 + owl-bot-staging/admin/v2/src/index.ts | 27 + .../src/v2/bigtable_instance_admin_client.ts | 2951 + ...bigtable_instance_admin_client_config.json | 139 + .../bigtable_instance_admin_proto_list.json | 8 + .../v2/src/v2/bigtable_table_admin_client.ts | 4182 ++ .../bigtable_table_admin_client_config.json | 175 + .../v2/bigtable_table_admin_proto_list.json | 8 + .../admin/v2/src/v2/gapic_metadata.json | 571 + owl-bot-staging/admin/v2/src/v2/index.ts | 20 + .../system-test/fixtures/sample/src/index.js | 28 + .../system-test/fixtures/sample/src/index.ts | 38 + .../admin/v2/system-test/install.ts | 49 + .../test/gapic_bigtable_instance_admin_v2.ts | 3532 + .../v2/test/gapic_bigtable_table_admin_v2.ts | 4916 ++ owl-bot-staging/admin/v2/tsconfig.json | 19 + owl-bot-staging/admin/v2/webpack.config.js | 64 + owl-bot-staging/v2/.eslintignore | 7 + owl-bot-staging/v2/.eslintrc.json | 3 + owl-bot-staging/v2/.gitignore | 14 + owl-bot-staging/v2/.jsdoc.js | 55 + owl-bot-staging/v2/.mocharc.js | 33 + owl-bot-staging/v2/.prettierrc.js | 22 + owl-bot-staging/v2/README.md | 1 + owl-bot-staging/v2/package.json | 58 + .../protos/google/bigtable/v2/bigtable.proto | 1102 + .../v2/protos/google/bigtable/v2/data.proto | 777 + .../google/bigtable/v2/feature_flags.proto | 64 + .../google/bigtable/v2/request_stats.proto | 113 + .../google/bigtable/v2/response_params.proto | 38 + .../v2/protos/google/bigtable/v2/types.proto | 294 + owl-bot-staging/v2/protos/protos.d.ts | 18201 +++++ owl-bot-staging/v2/protos/protos.js | 46519 ++++++++++++ owl-bot-staging/v2/protos/protos.json | 4202 ++ .../v2/bigtable.check_and_mutate_row.js | 108 + .../generated/v2/bigtable.execute_query.js | 114 + ...nerate_initial_change_stream_partitions.js | 76 + .../generated/v2/bigtable.mutate_row.js | 91 + .../generated/v2/bigtable.mutate_rows.js | 90 + .../generated/v2/bigtable.ping_and_warm.js | 72 + .../v2/bigtable.read_change_stream.js | 110 + .../v2/bigtable.read_modify_write_row.js | 92 + .../generated/v2/bigtable.read_rows.js | 110 + .../generated/v2/bigtable.sample_row_keys.js | 80 + .../snippet_metadata_google.bigtable.v2.json | 571 + owl-bot-staging/v2/src/index.ts | 25 + owl-bot-staging/v2/src/v2/bigtable_client.ts | 1451 + .../v2/src/v2/bigtable_client_config.json | 83 + .../v2/src/v2/bigtable_proto_list.json | 8 + owl-bot-staging/v2/src/v2/gapic_metadata.json | 93 + owl-bot-staging/v2/src/v2/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + owl-bot-staging/v2/system-test/install.ts | 49 + owl-bot-staging/v2/test/gapic_bigtable_v2.ts | 1585 + owl-bot-staging/v2/tsconfig.json | 19 + owl-bot-staging/v2/webpack.config.js | 64 + 125 files changed, 193725 insertions(+) create mode 100644 owl-bot-staging/admin/v2/.eslintignore create mode 100644 owl-bot-staging/admin/v2/.eslintrc.json create mode 100644 owl-bot-staging/admin/v2/.gitignore create mode 100644 owl-bot-staging/admin/v2/.jsdoc.js create mode 100644 owl-bot-staging/admin/v2/.mocharc.js create mode 100644 owl-bot-staging/admin/v2/.prettierrc.js create mode 100644 owl-bot-staging/admin/v2/README.md create mode 100644 owl-bot-staging/admin/v2/package.json create mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto create mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_table_admin.proto create mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/common.proto create mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/instance.proto create mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/table.proto create mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/types.proto create mode 100644 owl-bot-staging/admin/v2/protos/protos.d.ts create mode 100644 owl-bot-staging/admin/v2/protos/protos.js create mode 100644 owl-bot-staging/admin/v2/protos/protos.json create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_app_profile.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_cluster.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_instance.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_cluster.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_instance.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_app_profile.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_cluster.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_instance.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_clusters.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_instances.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_app_profile.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_cluster.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_instance.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.check_consistency.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.copy_backup.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_authorized_view.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_backup.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_backup.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_snapshot.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_table.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.drop_row_range.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_authorized_view.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_backup.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_iam_policy.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_snapshot.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_table.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_authorized_views.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_backups.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_snapshots.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_tables.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.modify_column_families.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.restore_table.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.set_iam_policy.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.snapshot_table.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.undelete_table.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_authorized_view.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_backup.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_table.js create mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json create mode 100644 owl-bot-staging/admin/v2/src/index.ts create mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client.ts create mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client_config.json create mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_proto_list.json create mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client.ts create mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client_config.json create mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_proto_list.json create mode 100644 owl-bot-staging/admin/v2/src/v2/gapic_metadata.json create mode 100644 owl-bot-staging/admin/v2/src/v2/index.ts create mode 100644 owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/admin/v2/system-test/install.ts create mode 100644 owl-bot-staging/admin/v2/test/gapic_bigtable_instance_admin_v2.ts create mode 100644 owl-bot-staging/admin/v2/test/gapic_bigtable_table_admin_v2.ts create mode 100644 owl-bot-staging/admin/v2/tsconfig.json create mode 100644 owl-bot-staging/admin/v2/webpack.config.js create mode 100644 owl-bot-staging/v2/.eslintignore create mode 100644 owl-bot-staging/v2/.eslintrc.json create mode 100644 owl-bot-staging/v2/.gitignore create mode 100644 owl-bot-staging/v2/.jsdoc.js create mode 100644 owl-bot-staging/v2/.mocharc.js create mode 100644 owl-bot-staging/v2/.prettierrc.js create mode 100644 owl-bot-staging/v2/README.md create mode 100644 owl-bot-staging/v2/package.json create mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/bigtable.proto create mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/data.proto create mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/feature_flags.proto create mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/request_stats.proto create mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/response_params.proto create mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/types.proto create mode 100644 owl-bot-staging/v2/protos/protos.d.ts create mode 100644 owl-bot-staging/v2/protos/protos.js create mode 100644 owl-bot-staging/v2/protos/protos.json create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.check_and_mutate_row.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.execute_query.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_row.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_rows.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.ping_and_warm.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.read_change_stream.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.read_modify_write_row.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.read_rows.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.sample_row_keys.js create mode 100644 owl-bot-staging/v2/samples/generated/v2/snippet_metadata_google.bigtable.v2.json create mode 100644 owl-bot-staging/v2/src/index.ts create mode 100644 owl-bot-staging/v2/src/v2/bigtable_client.ts create mode 100644 owl-bot-staging/v2/src/v2/bigtable_client_config.json create mode 100644 owl-bot-staging/v2/src/v2/bigtable_proto_list.json create mode 100644 owl-bot-staging/v2/src/v2/gapic_metadata.json create mode 100644 owl-bot-staging/v2/src/v2/index.ts create mode 100644 owl-bot-staging/v2/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/v2/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/v2/system-test/install.ts create mode 100644 owl-bot-staging/v2/test/gapic_bigtable_v2.ts create mode 100644 owl-bot-staging/v2/tsconfig.json create mode 100644 owl-bot-staging/v2/webpack.config.js diff --git a/owl-bot-staging/admin/v2/.eslintignore b/owl-bot-staging/admin/v2/.eslintignore new file mode 100644 index 000000000..cfc348ec4 --- /dev/null +++ b/owl-bot-staging/admin/v2/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/admin/v2/.eslintrc.json b/owl-bot-staging/admin/v2/.eslintrc.json new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/owl-bot-staging/admin/v2/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/admin/v2/.gitignore b/owl-bot-staging/admin/v2/.gitignore new file mode 100644 index 000000000..d4f03a0df --- /dev/null +++ b/owl-bot-staging/admin/v2/.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/owl-bot-staging/admin/v2/.jsdoc.js b/owl-bot-staging/admin/v2/.jsdoc.js new file mode 100644 index 000000000..0b0d11479 --- /dev/null +++ b/owl-bot-staging/admin/v2/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/bigtable', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/admin/v2/.mocharc.js b/owl-bot-staging/admin/v2/.mocharc.js new file mode 100644 index 000000000..13b67c34e --- /dev/null +++ b/owl-bot-staging/admin/v2/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/admin/v2/.prettierrc.js b/owl-bot-staging/admin/v2/.prettierrc.js new file mode 100644 index 000000000..9a8fd6909 --- /dev/null +++ b/owl-bot-staging/admin/v2/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/admin/v2/README.md b/owl-bot-staging/admin/v2/README.md new file mode 100644 index 000000000..5d45b74ed --- /dev/null +++ b/owl-bot-staging/admin/v2/README.md @@ -0,0 +1 @@ +Admin: Nodejs Client diff --git a/owl-bot-staging/admin/v2/package.json b/owl-bot-staging/admin/v2/package.json new file mode 100644 index 000000000..3c1209d53 --- /dev/null +++ b/owl-bot-staging/admin/v2/package.json @@ -0,0 +1,59 @@ +{ + "name": "@google-cloud/bigtable", + "version": "0.1.0", + "description": "Admin client for Node.js", + "repository": "googleapis/nodejs-admin", + "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 build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto new file mode 100644 index 000000000..5e3fe7aff --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto @@ -0,0 +1,751 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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"; + } + + // 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: "*" + }; + 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: "*" + }; + 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: "*" + }; + 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"; + } +} + +// 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. + // Currently, at most four clusters can be specified. + 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; +} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_table_admin.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_table_admin.proto new file mode 100644 index 000000000..1fdcefa4a --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -0,0 +1,1434 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 Table or Backup 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: "*" + } + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the access control policy on a Table or Backup 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: "*" + } + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Returns permissions that the caller has on the specified Table or Backup + // 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: "*" + } + }; + option (google.api.method_signature) = "resource,permissions"; + } +} + +// 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` + // + // 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]; +} + +// 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 CreateInstance 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 views' 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//instances//tables/
/authorizedViews/ + 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]; +} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/common.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/common.proto new file mode 100644 index 000000000..fe28f5fa8 --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/common.proto @@ -0,0 +1,54 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/instance.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/instance.proto new file mode 100644 index 000000000..188dae7eb --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/instance.proto @@ -0,0 +1,414 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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}" + }; + + // 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; + } + + // 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]; + + // (`OutputOnly`) + // The current state of the instance. + State state = 3; + + // The type of the instance. Defaults to `PRODUCTION`. + Type type = 4; + + // 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 server-assigned 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]; +} + +// 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}" + }; + + // 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; + } + + // 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. + // 3) All clusters within an instance must use the same CMEK key. + // 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 allocated to this cluster. More nodes enable higher + // throughput and more consistent performance. + int32 serve_nodes = 4; + + 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}" + }; + + // 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 { + // 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; + } + + // 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 on your Bigtable data, without impacting the + // performance of the clusters that handle your application traffic. + // Currently, Data Boost exclusively supports read-only use-cases with + // single-cluster routing. + // + // Data Boost reads are only guaranteed to see the results of writes that + // were written at least 30 minutes ago. This means newly written values may + // not become visible for up to 30m, and also means that old values may + // remain visible for up to 30m after being deleted or overwritten. To + // mitigate the staleness of the data, users may either wait 30m, or use + // CheckConsistency. + 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}" + }; + + // 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]; +} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/table.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/table.proto new file mode 100644 index 000000000..b2ef458c8 --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/table.proto @@ -0,0 +1,581 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. The only + // supported value at this time is 3 days. + google.protobuf.Duration retention_period = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. How frequently automated backups should occur. The only + // supported value at this time is 24 hours. + google.protobuf.Duration frequency = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + // 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; + } +} + +// 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; +} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/types.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/types.proto new file mode 100644 index 000000000..49c50d176 --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/types.proto @@ -0,0 +1,294 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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/from the underlying data. +// +// Each encoding also defines the following properties: +// +// * Order-preserving: Does the encoded value sort consistently with the +// original typed value? Note that Bigtable will always sort data based on +// the raw encoded value, *not* the decoded type. +// - Example: BYTES values sort in the same order as their raw encodings. +// - Counterexample: Encoding INT64 as a fixed-width decimal string does +// *not* preserve sort order when dealing with negative numbers. +// `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. +// * Self-delimiting: If we concatenate two encoded values, can we always tell +// where the first one ends and the second one begins? +// - Example: If we encode INT64s to fixed-width STRINGs, the first value +// will always contain exactly N digits, possibly preceded by a sign. +// - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have +// no way to tell where the first one ends. +// * Compatibility: Which other systems have matching encoding schemes? For +// example, does this encoding have a GoogleSQL equivalent? HBase? Java? +message Type { + // Bytes + // Values of type `Bytes` are stored in `Value.bytes_value`. + message Bytes { + // Rules used to convert to/from lower level types. + message Encoding { + // Leaves the value "as-is" + // * Order-preserving? Yes + // * Self-delimiting? No + // * Compatibility? N/A + message Raw {} + + // Which encoding to use. + oneof encoding { + // Use `Raw` encoding. + Raw raw = 1; + } + } + + // The encoding to use when converting to/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/from lower level types. + message Encoding { + // Deprecated: prefer the equivalent `Utf8Bytes`. + message Utf8Raw { + option deprecated = true; + } + + // UTF-8 encoding + // * Order-preserving? Yes (code point order) + // * Self-delimiting? No + // * Compatibility? + // - BigQuery Federation `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/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/from lower level types. + message Encoding { + // Encodes the value as an 8-byte big endian twos complement `Bytes` + // value. + // * Order-preserving? No (positive values only) + // * Self-delimiting? Yes + // * Compatibility? + // - BigQuery Federation `BINARY` encoding + // - HBase `Bytes.toBytes` + // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` + message BigEndianBytes { + // Deprecated: ignored if set. + Bytes bytes_type = 1; + } + + // Which encoding to use. + oneof encoding { + // Use `BigEndianBytes` encoding. + BigEndianBytes big_endian_bytes = 1; + } + } + + // The encoding to use when converting to/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 {} + + // 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; + } + + // The names and types of the fields in this struct. + repeated Field fields = 1; + } + + // 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; + } +} diff --git a/owl-bot-staging/admin/v2/protos/protos.d.ts b/owl-bot-staging/admin/v2/protos/protos.d.ts new file mode 100644 index 000000000..c0c8232f5 --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/protos.d.ts @@ -0,0 +1,24392 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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; + } + + 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; + } + + /** 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 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 labels */ + labels?: ({ [k: string]: string }|null); + + /** Instance createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Instance satisfiesPzs */ + satisfiesPzs?: (boolean|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 labels. */ + public labels: { [k: string]: string }; + + /** Instance createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Instance satisfiesPzs. */ + public satisfiesPzs?: (boolean|null); + + /** Instance _satisfiesPzs. */ + public _satisfiesPzs?: "satisfiesPzs"; + + /** + * 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 + } + } + + /** 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 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 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 + } + + /** 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); + } + + /** 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[]; + + /** + * 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; + } + + /** 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); + + /** DataBoostIsolationReadOnly _computeBillingOwner. */ + public _computeBillingOwner?: "computeBillingOwner"; + + /** + * 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; + } + + /** 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; + } + + 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; + } + + /** 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|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|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|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|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); + } + + /** 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); + + /** + * 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 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); + } + + /** 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 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); + } + + /** 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); + + /** + * 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 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); + } + + /** 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 kind. */ + public kind?: ("bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"); + + /** + * 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); + } + + /** 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 encoding. */ + public encoding?: "bigEndianBytes"; + + /** + * 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 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 { + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.ITimestamp); + + /** + * 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; + } + + /** 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); + } + + /** 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[]; + + /** + * 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 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 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); + } + + /** 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[]; + + /** + * 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); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** 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); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** 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 + } + + /** 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; + } + } + + /** 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_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 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 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); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** 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); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions 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.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 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 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 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 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 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.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a 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|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a 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); + } + + /** 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); + + /** + * 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 + } + } + + /** 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 features */ + features?: (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 features. */ + public features?: (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 + } + } + } + + /** 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|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of 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; + } + } + + /** 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|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|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; + } + } + + /** 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; + } + } +} diff --git a/owl-bot-staging/admin/v2/protos/protos.js b/owl-bot-staging/admin/v2/protos/protos.js new file mode 100644 index 000000000..699e7e260 --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/protos.js @@ -0,0 +1,60034 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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_protos || ($protobuf.roots._google_cloud_bigtable_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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 + */ + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + 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()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.clusters[key] = value; + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.bigtable.admin.v2.Instance.verify(message.instance); + if (error) + return "instance." + error; + } + if (message.clusters != null && message.hasOwnProperty("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]]); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateInstanceRequest) + return object; + 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 (typeof object.instance !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest.instance: object expected"); + message.instance = $root.google.bigtable.admin.v2.Instance.fromObject(object.instance); + } + if (object.clusters) { + if (typeof object.clusters !== "object") + 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 (typeof object.clusters[keys[i]] !== "object") + 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]]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.clusters = {}; + if (options.defaults) { + object.parent = ""; + object.instanceId = ""; + object.instance = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options); + var keys2; + if (message.clusters && (keys2 = Object.keys(message.clusters)).length) { + object.clusters = {}; + for (var j = 0; j < keys2.length; ++j) + object.clusters[keys2[j]] = $root.google.bigtable.admin.v2.Cluster.toObject(message.clusters[keys2[j]], options); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.GetInstanceRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListInstancesRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instances != null && message.hasOwnProperty("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]); + if (error) + return "instances." + error; + } + } + if (message.failedLocations != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListInstancesResponse) + return object; + 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 (typeof object.instances[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse.instances: object expected"); + message.instances[i] = $root.google.bigtable.admin.v2.Instance.fromObject(object.instances[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.instance = $root.google.bigtable.admin.v2.Instance.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.bigtable.admin.v2.Instance.verify(message.instance); + if (error) + return "instance." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest) + return object; + var message = new $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest(); + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest.instance: object expected"); + message.instance = $root.google.bigtable.admin.v2.Instance.fromObject(object.instance); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.instance = null; + object.updateMask = null; + } + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteInstanceRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateClusterRequest) + return object; + 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 (typeof object.cluster !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateClusterRequest.cluster: object expected"); + message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.clusterId = ""; + object.cluster = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.GetClusterRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListClustersRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusters != null && message.hasOwnProperty("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]); + if (error) + return "clusters." + error; + } + } + if (message.failedLocations != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListClustersResponse) + return object; + 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 (typeof object.clusters[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListClustersResponse.clusters: object expected"); + message.clusters[i] = $root.google.bigtable.admin.v2.Cluster.fromObject(object.clusters[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteClusterRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateInstanceRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateInstanceMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.CreateInstanceMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateInstanceMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.UpdateInstanceMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.tables[key] = value; + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateClusterRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; + } + if (message.tables != null && message.hasOwnProperty("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]]); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateClusterMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.CreateClusterMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + if (object.tables) { + if (typeof object.tables !== "object") + 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 (typeof object.tables[keys[i]] !== "object") + 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]]); + } + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + var keys2; + if (message.tables && (keys2 = Object.keys(message.tables)).length) { + object.tables = {}; + for (var j = 0; j < keys2.length; ++j) + object.tables[keys2[j]] = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.toObject(message.tables[keys2[j]], options); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.estimatedSizeBytes != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress) + return object; + var message = new $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress(); + if (object.estimatedSizeBytes != null) + if ($util.Long) + (message.estimatedSizeBytes = $util.Long.fromValue(object.estimatedSizeBytes)).unsigned = 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)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.estimatedSizeBytes = options.longs === String ? "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() : long; + } else + object.estimatedCopiedBytes = options.longs === String ? "0" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.estimatedSizeBytes != null && message.hasOwnProperty("estimatedSizeBytes")) + 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 && message.hasOwnProperty("estimatedCopiedBytes")) + 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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateClusterMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.UpdateClusterMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.Cluster.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.Cluster.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.verify(message.originalRequest); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata(); + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.fromObject(object.originalRequest); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.requestTime = null; + object.finishTime = null; + object.originalRequest = null; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.toObject(message.originalRequest, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.cluster = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster); + if (error) + return "cluster." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterRequest) + return object; + var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterRequest(); + if (object.cluster != null) { + if (typeof object.cluster !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.cluster: object expected"); + message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cluster = null; + object.updateMask = null; + } + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 4: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.appProfile != null && message.hasOwnProperty("appProfile")) { + var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile); + if (error) + return "appProfile." + error; + } + if (message.ignoreWarnings != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAppProfileRequest) + return object; + 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 (typeof object.appProfile !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAppProfileRequest.appProfile: object expected"); + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.appProfileId = ""; + object.appProfile = null; + object.ignoreWarnings = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.appProfile != null && message.hasOwnProperty("appProfile")) + object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); + if (message.ignoreWarnings != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.GetAppProfileRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.appProfiles != null && message.hasOwnProperty("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]); + if (error) + return "appProfiles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.failedLocations != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesResponse) + return object; + 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 (typeof object.appProfiles[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: object expected"); + message.appProfiles[i] = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfiles[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.nextPageToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.appProfile != null && message.hasOwnProperty("appProfile")) { + var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile); + if (error) + return "appProfile." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.ignoreWarnings != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileRequest) + return object; + var message = new $root.google.bigtable.admin.v2.UpdateAppProfileRequest(); + if (object.appProfile != null) { + if (typeof object.appProfile !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.appProfile: object expected"); + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.appProfile = null; + object.updateMask = null; + object.ignoreWarnings = false; + } + if (message.appProfile != null && message.hasOwnProperty("appProfile")) + object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.ignoreWarnings != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.ignoreWarnings != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteAppProfileRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.ignoreWarnings = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.ignoreWarnings != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.pageSize = reader.int32(); + break; + } + case 5: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.ListHotTabletsRequest) + return object; + var message = new $root.google.bigtable.admin.v2.ListHotTabletsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.startTime = null; + object.endTime = null; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hotTablets != null && message.hasOwnProperty("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]); + if (error) + return "hotTablets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListHotTabletsResponse) + return object; + 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 (typeof object.hotTablets[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsResponse.hotTablets: object expected"); + message.hotTablets[i] = $root.google.bigtable.admin.v2.HotTablet.fromObject(object.hotTablets[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.nextPageToken != null && message.hasOwnProperty("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.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 {Object.|null} [labels] Instance labels + * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime + * @property {boolean|null} [satisfiesPzs] Instance satisfiesPzs + */ + + /** + * 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 = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + 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 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; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Instance _satisfiesPzs. + * @member {"satisfiesPzs"|undefined} _satisfiesPzs + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Object.defineProperty(Instance.prototype, "_satisfiesPzs", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.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()).ldelim(); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.satisfiesPzs = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + properties._satisfiesPzs = 1; + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean 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) { + if (object instanceof $root.google.bigtable.admin.v2.Instance) + return object; + 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; + } + if (object.labels) { + if (typeof object.labels !== "object") + 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) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Instance.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + 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) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + 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; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.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 && message.hasOwnProperty("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) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + object.satisfiesPzs = message.satisfiesPzs; + if (options.oneofs) + object._satisfiesPzs = "satisfiesPzs"; + } + 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; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 2: { + message.cpuUtilizationPercent = reader.int32(); + break; + } + case 3: { + message.storageUtilizationGibPerNode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpuUtilizationPercent != null && message.hasOwnProperty("cpuUtilizationPercent")) + if (!$util.isInteger(message.cpuUtilizationPercent)) + return "cpuUtilizationPercent: integer expected"; + if (message.storageUtilizationGibPerNode != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.AutoscalingTargets) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpuUtilizationPercent = 0; + object.storageUtilizationGibPerNode = 0; + } + if (message.cpuUtilizationPercent != null && message.hasOwnProperty("cpuUtilizationPercent")) + object.cpuUtilizationPercent = message.cpuUtilizationPercent; + if (message.storageUtilizationGibPerNode != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.minServeNodes = reader.int32(); + break; + } + case 2: { + message.maxServeNodes = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minServeNodes != null && message.hasOwnProperty("minServeNodes")) + if (!$util.isInteger(message.minServeNodes)) + return "minServeNodes: integer expected"; + if (message.maxServeNodes != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.AutoscalingLimits) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.minServeNodes = 0; + object.maxServeNodes = 0; + } + if (message.minServeNodes != null && message.hasOwnProperty("minServeNodes")) + object.minServeNodes = message.minServeNodes; + if (message.maxServeNodes != null && message.hasOwnProperty("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.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) + 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 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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()).ldelim(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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 7: { + message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.defaultStorageType = reader.int32(); + break; + } + case 6: { + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.serveNodes != null && message.hasOwnProperty("serveNodes")) + if (!$util.isInteger(message.serveNodes)) + return "serveNodes: integer expected"; + if (message.clusterConfig != null && message.hasOwnProperty("clusterConfig")) { + properties.config = 1; + { + var error = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.verify(message.clusterConfig); + if (error) + return "clusterConfig." + error; + } + } + if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) + switch (message.defaultStorageType) { + default: + return "defaultStorageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.verify(message.encryptionConfig); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster) + return object; + 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; + if (object.clusterConfig != null) { + if (typeof object.clusterConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.clusterConfig: object expected"); + message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.fromObject(object.clusterConfig); + } + 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 (typeof object.encryptionConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.fromObject(object.encryptionConfig); + } + 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) { + if (!options) + options = {}; + 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; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.state != null && message.hasOwnProperty("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 && message.hasOwnProperty("serveNodes")) + object.serveNodes = message.serveNodes; + if (message.defaultStorageType != null && message.hasOwnProperty("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 && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options); + if (message.clusterConfig != null && message.hasOwnProperty("clusterConfig")) { + object.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.toObject(message.clusterConfig, options); + if (options.oneofs) + object.config = "clusterConfig"; + } + 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; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.decode(reader, reader.uint32()); + break; + } + case 2: { + message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) { + var error = $root.google.bigtable.admin.v2.AutoscalingLimits.verify(message.autoscalingLimits); + if (error) + return "autoscalingLimits." + error; + } + if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) { + var error = $root.google.bigtable.admin.v2.AutoscalingTargets.verify(message.autoscalingTargets); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) + return object; + var message = new $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig(); + if (object.autoscalingLimits != null) { + if (typeof object.autoscalingLimits !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingLimits: object expected"); + message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.fromObject(object.autoscalingLimits); + } + if (object.autoscalingTargets != null) { + if (typeof object.autoscalingTargets !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingTargets: object expected"); + message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.fromObject(object.autoscalingTargets); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.autoscalingLimits = null; + object.autoscalingTargets = null; + } + if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) + object.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.toObject(message.autoscalingLimits, options); + if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) + object.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.toObject(message.autoscalingTargets, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterAutoscalingConfig != null && message.hasOwnProperty("clusterAutoscalingConfig")) { + var error = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify(message.clusterAutoscalingConfig); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterConfig) + return object; + var message = new $root.google.bigtable.admin.v2.Cluster.ClusterConfig(); + if (object.clusterAutoscalingConfig != null) { + if (typeof object.clusterAutoscalingConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterConfig.clusterAutoscalingConfig: object expected"); + message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.fromObject(object.clusterAutoscalingConfig); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.clusterAutoscalingConfig = null; + if (message.clusterAutoscalingConfig != null && message.hasOwnProperty("clusterAutoscalingConfig")) + object.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.toObject(message.clusterAutoscalingConfig, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.kmsKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.EncryptionConfig) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 6: { + message.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.decode(reader, reader.uint32()); + break; + } + case 7: { + message.priority = reader.int32(); + break; + } + case 11: { + message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.decode(reader, reader.uint32()); + break; + } + case 10: { + message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.multiClusterRoutingUseAny != null && message.hasOwnProperty("multiClusterRoutingUseAny")) { + properties.routingPolicy = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.verify(message.multiClusterRoutingUseAny); + if (error) + return "multiClusterRoutingUseAny." + error; + } + } + if (message.singleClusterRouting != null && message.hasOwnProperty("singleClusterRouting")) { + if (properties.routingPolicy === 1) + return "routingPolicy: multiple values"; + properties.routingPolicy = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.verify(message.singleClusterRouting); + if (error) + return "singleClusterRouting." + error; + } + } + if (message.priority != null && message.hasOwnProperty("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 && message.hasOwnProperty("standardIsolation")) { + if (properties.isolation === 1) + return "isolation: multiple values"; + properties.isolation = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.verify(message.standardIsolation); + if (error) + return "standardIsolation." + error; + } + } + if (message.dataBoostIsolationReadOnly != null && message.hasOwnProperty("dataBoostIsolationReadOnly")) { + if (properties.isolation === 1) + return "isolation: multiple values"; + properties.isolation = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify(message.dataBoostIsolationReadOnly); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile) + return object; + 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 (typeof object.multiClusterRoutingUseAny !== "object") + throw TypeError(".google.bigtable.admin.v2.AppProfile.multiClusterRoutingUseAny: object expected"); + message.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.fromObject(object.multiClusterRoutingUseAny); + } + if (object.singleClusterRouting != null) { + if (typeof object.singleClusterRouting !== "object") + throw TypeError(".google.bigtable.admin.v2.AppProfile.singleClusterRouting: object expected"); + message.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.fromObject(object.singleClusterRouting); + } + 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 (typeof object.standardIsolation !== "object") + throw TypeError(".google.bigtable.admin.v2.AppProfile.standardIsolation: object expected"); + message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.fromObject(object.standardIsolation); + } + if (object.dataBoostIsolationReadOnly != null) { + if (typeof object.dataBoostIsolationReadOnly !== "object") + throw TypeError(".google.bigtable.admin.v2.AppProfile.dataBoostIsolationReadOnly: object expected"); + message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.fromObject(object.dataBoostIsolationReadOnly); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.multiClusterRoutingUseAny != null && message.hasOwnProperty("multiClusterRoutingUseAny")) { + object.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.toObject(message.multiClusterRoutingUseAny, options); + if (options.oneofs) + object.routingPolicy = "multiClusterRoutingUseAny"; + } + if (message.singleClusterRouting != null && message.hasOwnProperty("singleClusterRouting")) { + object.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.toObject(message.singleClusterRouting, options); + if (options.oneofs) + object.routingPolicy = "singleClusterRouting"; + } + if (message.priority != null && message.hasOwnProperty("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 && message.hasOwnProperty("dataBoostIsolationReadOnly")) { + object.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.toObject(message.dataBoostIsolationReadOnly, options); + if (options.oneofs) + object.isolation = "dataBoostIsolationReadOnly"; + } + if (message.standardIsolation != null && message.hasOwnProperty("standardIsolation")) { + object.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.toObject(message.standardIsolation, options); + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MultiClusterRoutingUseAny clusterIds. + * @member {Array.} clusterIds + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @instance + */ + MultiClusterRoutingUseAny.prototype.clusterIds = $util.emptyArray; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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]); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + if (!(message.clusterIds && message.clusterIds.length)) + message.clusterIds = []; + message.clusterIds.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterIds != null && message.hasOwnProperty("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"; + } + 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) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) + return object; + 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]); + } + 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) { + if (!options) + options = {}; + 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]; + } + 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"; + }; + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.clusterId = reader.string(); + break; + } + case 2: { + message.allowTransactionalWrites = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.allowTransactionalWrites != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterId = ""; + object.allowTransactionalWrites = false; + } + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.allowTransactionalWrites != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.priority = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.priority != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.StandardIsolation) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.priority = options.enums === String ? "PRIORITY_UNSPECIFIED" : 0; + if (message.priority != null && message.hasOwnProperty("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) + 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; + + /** + * DataBoostIsolationReadOnly _computeBillingOwner. + * @member {"computeBillingOwner"|undefined} _computeBillingOwner + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @instance + */ + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.computeBillingOwner = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.computeBillingOwner != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (message.computeBillingOwner != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.startKey != null && message.hasOwnProperty("startKey")) + if (!$util.isString(message.startKey)) + return "startKey: string expected"; + if (message.endKey != null && message.hasOwnProperty("endKey")) + if (!$util.isString(message.endKey)) + return "endKey: string expected"; + if (message.nodeCpuUsagePercent != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.HotTablet) + return object; + 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 (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.HotTablet.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.HotTablet.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("name")) + object.name = message.name; + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.startKey != null && message.hasOwnProperty("startKey")) + object.startKey = message.startKey; + if (message.endKey != null && message.hasOwnProperty("endKey")) + object.endKey = message.endKey; + if (message.nodeCpuUsagePercent != null && message.hasOwnProperty("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; + })(); + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.progressPercent = reader.int32(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (!$util.isInteger(message.progressPercent)) + return "progressPercent: integer expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + 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) { + if (object instanceof $root.google.bigtable.admin.v2.OperationProgress) + return object; + var message = new $root.google.bigtable.admin.v2.OperationProgress(); + if (object.progressPercent != null) + message.progressPercent = object.progressPercent | 0; + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.OperationProgress.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.OperationProgress.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.progressPercent = 0; + object.startTime = null; + object.endTime = null; + } + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + object.progressPercent = message.progressPercent; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + 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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 + */ + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.backup != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.RestoreTableRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.tableId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.backup != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 4: { + message.optimizeTableOperationName = reader.string(); + break; + } + case 5: { + message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + break; + } + if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { + properties.sourceInfo = 1; + { + var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo); + if (error) + return "backupInfo." + error; + } + } + if (message.optimizeTableOperationName != null && message.hasOwnProperty("optimizeTableOperationName")) + if (!$util.isString(message.optimizeTableOperationName)) + return "optimizeTableOperationName: string expected"; + if (message.progress != null && message.hasOwnProperty("progress")) { + var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.RestoreTableMetadata) + return object; + 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 (typeof object.backupInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata.backupInfo: object expected"); + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo); + } + if (object.optimizeTableOperationName != null) + message.optimizeTableOperationName = String(object.optimizeTableOperationName); + if (object.progress != null) { + if (typeof object.progress !== "object") + throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata.progress: object expected"); + message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress); + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sourceType != null && message.hasOwnProperty("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 && message.hasOwnProperty("backupInfo")) { + object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options); + if (options.oneofs) + object.sourceInfo = "backupInfo"; + } + if (message.optimizeTableOperationName != null && message.hasOwnProperty("optimizeTableOperationName")) + object.optimizeTableOperationName = message.optimizeTableOperationName; + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.progress != null && message.hasOwnProperty("progress")) { + var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.OptimizeRestoredTableMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.OptimizeRestoredTableMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.progress != null) { + if (typeof object.progress !== "object") + throw TypeError(".google.bigtable.admin.v2.OptimizeRestoredTableMetadata.progress: object expected"); + message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.progress = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.table != null && message.hasOwnProperty("table")) { + var error = $root.google.bigtable.admin.v2.Table.verify(message.table); + if (error) + return "table." + error; + } + if (message.initialSplits != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateTableRequest) + return object; + 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 (typeof object.table !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.table: object expected"); + message.table = $root.google.bigtable.admin.v2.Table.fromObject(object.table); + } + 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 (typeof object.initialSplits[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.initialSplits: object expected"); + message.initialSplits[i] = $root.google.bigtable.admin.v2.CreateTableRequest.Split.fromObject(object.initialSplits[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.initialSplits = []; + if (options.defaults) { + object.parent = ""; + object.tableId = ""; + object.table = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.table != null && message.hasOwnProperty("table")) + object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options); + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.key = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateTableRequest.Split) + return object; + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.sourceSnapshot != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.tableId = ""; + object.sourceSnapshot = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.sourceSnapshot != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.rowKeyPrefix != null && message.hasOwnProperty("rowKeyPrefix")) { + properties.target = 1; + if (!(message.rowKeyPrefix && typeof message.rowKeyPrefix.length === "number" || $util.isString(message.rowKeyPrefix))) + return "rowKeyPrefix: buffer expected"; + } + if (message.deleteAllDataFromTable != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.DropRowRangeRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.rowKeyPrefix != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 4: + break; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + 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) { + if (object instanceof $root.google.bigtable.admin.v2.ListTablesRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.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 && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tables != null && message.hasOwnProperty("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]); + if (error) + return "tables." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListTablesResponse) + return object; + 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 (typeof object.tables[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListTablesResponse.tables: object expected"); + message.tables[i] = $root.google.bigtable.admin.v2.Table.fromObject(object.tables[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.nextPageToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 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) { + if (object instanceof $root.google.bigtable.admin.v2.GetTableRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.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 + */ + + /** + * 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) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.table = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) { + var error = $root.google.bigtable.admin.v2.Table.verify(message.table); + if (error) + return "table." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an 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) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateTableRequest) + return object; + var message = new $root.google.bigtable.admin.v2.UpdateTableRequest(); + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest.table: object expected"); + message.table = $root.google.bigtable.admin.v2.Table.fromObject(object.table); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.table = null; + object.updateMask = null; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + 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) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateTableMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.UpdateTableMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteTableRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates 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) { + if (object instanceof $root.google.bigtable.admin.v2.UndeleteTableRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + 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) { + if (object instanceof $root.google.bigtable.admin.v2.UndeleteTableMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.UndeleteTableMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + case 3: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.modifications != null && message.hasOwnProperty("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]); + if (error) + return "modifications." + error; + } + } + if (message.ignoreWarnings != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) + return object; + 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 (typeof object.modifications[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.modifications: object expected"); + message.modifications[i] = $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.fromObject(object.modifications[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.modifications = []; + if (options.defaults) { + object.name = ""; + object.ignoreWarnings = false; + } + if (message.name != null && message.hasOwnProperty("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); + } + if (message.ignoreWarnings != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.create != null && Object.hasOwnProperty.call(message, "create")) + $root.google.bigtable.admin.v2.ColumnFamily.encode(message.create, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.create = $root.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32()); + break; + } + case 3: { + message.update = $root.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32()); + break; + } + case 4: { + message.drop = reader.bool(); + break; + } + case 6: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.create != null && message.hasOwnProperty("create")) { + properties.mod = 1; + { + var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.create); + if (error) + return "create." + error; + } + } + if (message.update != null && message.hasOwnProperty("update")) { + if (properties.mod === 1) + return "mod: multiple values"; + properties.mod = 1; + { + var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.update); + if (error) + return "update." + error; + } + } + if (message.drop != null && message.hasOwnProperty("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 && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) + return object; + var message = new $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification(); + if (object.id != null) + message.id = String(object.id); + if (object.create != null) { + if (typeof object.create !== "object") + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.create: object expected"); + message.create = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.create); + } + if (object.update != null) { + if (typeof object.update !== "object") + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.update: object expected"); + message.update = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.update); + } + if (object.drop != null) + message.drop = Boolean(object.drop); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.updateMask = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.create != null && message.hasOwnProperty("create")) { + object.create = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.create, options); + if (options.oneofs) + object.mod = "create"; + } + if (message.update != null && message.hasOwnProperty("update")) { + object.update = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.update, options); + if (options.oneofs) + object.mod = "update"; + } + if (message.drop != null && message.hasOwnProperty("drop")) { + object.drop = message.drop; + if (options.oneofs) + object.mod = "drop"; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.consistencyToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consistencyToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.consistencyToken = ""; + if (message.consistencyToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 4: { + message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) + if (!$util.isString(message.consistencyToken)) + return "consistencyToken: string expected"; + if (message.standardReadRemoteWrites != null && message.hasOwnProperty("standardReadRemoteWrites")) { + properties.mode = 1; + { + var error = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.verify(message.standardReadRemoteWrites); + if (error) + return "standardReadRemoteWrites." + error; + } + } + if (message.dataBoostReadLocalWrites != null && message.hasOwnProperty("dataBoostReadLocalWrites")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.verify(message.dataBoostReadLocalWrites); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CheckConsistencyRequest) + return object; + 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 (typeof object.standardReadRemoteWrites !== "object") + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.standardReadRemoteWrites: object expected"); + message.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.fromObject(object.standardReadRemoteWrites); + } + if (object.dataBoostReadLocalWrites != null) { + if (typeof object.dataBoostReadLocalWrites !== "object") + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.dataBoostReadLocalWrites: object expected"); + message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.fromObject(object.dataBoostReadLocalWrites); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.consistencyToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) + object.consistencyToken = message.consistencyToken; + if (message.standardReadRemoteWrites != null && message.hasOwnProperty("standardReadRemoteWrites")) { + object.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.toObject(message.standardReadRemoteWrites, options); + if (options.oneofs) + object.mode = "standardReadRemoteWrites"; + } + if (message.dataBoostReadLocalWrites != null && message.hasOwnProperty("dataBoostReadLocalWrites")) { + object.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.toObject(message.dataBoostReadLocalWrites, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.consistent = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consistent != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.CheckConsistencyResponse) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.consistent = false; + if (message.consistent != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + if (!$util.isString(message.snapshotId)) + return "snapshotId: string expected"; + if (message.ttl != null && message.hasOwnProperty("ttl")) { + var error = $root.google.protobuf.Duration.verify(message.ttl); + if (error) + return "ttl." + error; + } + if (message.description != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.SnapshotTableRequest) + return object; + 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 (typeof object.ttl !== "object") + throw TypeError(".google.bigtable.admin.v2.SnapshotTableRequest.ttl: object expected"); + message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.cluster = ""; + object.snapshotId = ""; + object.ttl = null; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = message.cluster; + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + object.snapshotId = message.snapshotId; + if (message.ttl != null && message.hasOwnProperty("ttl")) + object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); + if (message.description != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.GetSnapshotRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.ListSnapshotsRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshots != null && message.hasOwnProperty("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]); + if (error) + return "snapshots." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListSnapshotsResponse) + return object; + 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 (typeof object.snapshots[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListSnapshotsResponse.snapshots: object expected"); + message.snapshots[i] = $root.google.bigtable.admin.v2.Snapshot.fromObject(object.snapshots[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.nextPageToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteSnapshotRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.SnapshotTableRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.SnapshotTableMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.SnapshotTableMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.bigtable.admin.v2.Backup.verify(message.backup); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateBackupRequest) + return object; + 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 (typeof object.backup !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateBackupRequest.backup: object expected"); + message.backup = $root.google.bigtable.admin.v2.Backup.fromObject(object.backup); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupId = ""; + object.backup = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (!$util.isString(message.sourceTable)) + return "sourceTable: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateBackupMetadata) + return object; + 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 (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.sourceTable = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + object.sourceTable = message.sourceTable; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.backup = $root.google.bigtable.admin.v2.Backup.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.bigtable.admin.v2.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an 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) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateBackupRequest) + return object; + var message = new $root.google.bigtable.admin.v2.UpdateBackupRequest(); + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.bigtable.admin.v2.Backup.fromObject(object.backup); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backup = null; + object.updateMask = null; + } + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.GetBackupRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteBackupRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListBackupsRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.orderBy = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backups != null && message.hasOwnProperty("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]); + if (error) + return "backups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListBackupsResponse) + return object; + 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 (typeof object.backups[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.bigtable.admin.v2.Backup.fromObject(object.backups[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.nextPageToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (!$util.isString(message.sourceBackup)) + return "sourceBackup: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.CopyBackupRequest) + return object; + 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 (typeof object.expireTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CopyBackupRequest.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupId = ""; + object.sourceBackup = ""; + object.expireTime = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + object.sourceBackup = message.sourceBackup; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sourceBackupInfo != null && Object.hasOwnProperty.call(message, "sourceBackupInfo")) + $root.google.bigtable.admin.v2.BackupInfo.encode(message.sourceBackupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceBackupInfo != null && message.hasOwnProperty("sourceBackupInfo")) { + var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.sourceBackupInfo); + if (error) + return "sourceBackupInfo." + error; + } + if (message.progress != null && message.hasOwnProperty("progress")) { + var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CopyBackupMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.CopyBackupMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.sourceBackupInfo != null) { + if (typeof object.sourceBackupInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata.sourceBackupInfo: object expected"); + message.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.sourceBackupInfo); + } + if (object.progress != null) { + if (typeof object.progress !== "object") + throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata.progress: object expected"); + message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.sourceBackupInfo = null; + object.progress = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sourceBackupInfo != null && message.hasOwnProperty("sourceBackupInfo")) + object.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.sourceBackupInfo, options); + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.authorizedViewId != null && message.hasOwnProperty("authorizedViewId")) + if (!$util.isString(message.authorizedViewId)) + return "authorizedViewId: string expected"; + if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest) + return object; + 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 (typeof object.authorizedView !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewRequest.authorizedView: object expected"); + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.authorizedViewId = ""; + object.authorizedView = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.authorizedViewId != null && message.hasOwnProperty("authorizedViewId")) + object.authorizedViewId = message.authorizedViewId; + if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) + object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + 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) { + if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest) + return object; + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.authorizedViews != null && message.hasOwnProperty("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]); + if (error) + return "authorizedViews." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse) + return object; + 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 (typeof object.authorizedViews[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse.authorizedViews: object expected"); + message.authorizedViews[i] = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedViews[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.nextPageToken != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 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) { + if (object instanceof $root.google.bigtable.admin.v2.GetAuthorizedViewRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "RESPONSE_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView); + if (error) + return "authorizedView." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.ignoreWarnings != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest) + return object; + var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(); + if (object.authorizedView != null) { + if (typeof object.authorizedView !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.authorizedView: object expected"); + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.authorizedView = null; + object.updateMask = null; + object.ignoreWarnings = false; + } + if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) + object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.ignoreWarnings != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) + return object; + var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this 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.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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.sourceType = reader.int32(); + break; + } + case 2: { + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + break; + } + if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { + properties.sourceInfo = 1; + { + var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.RestoreInfo) + return object; + 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 (typeof object.backupInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.RestoreInfo.backupInfo: object expected"); + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sourceType = options.enums === String ? "RESTORE_SOURCE_TYPE_UNSPECIFIED" : 0; + if (message.sourceType != null && message.hasOwnProperty("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 && message.hasOwnProperty("backupInfo")) { + object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options); + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeStreamConfig retentionPeriod. + * @member {google.protobuf.IDuration|null|undefined} retentionPeriod + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @instance + */ + ChangeStreamConfig.prototype.retentionPeriod = null; + + /** + * Creates a new ChangeStreamConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig instance + */ + ChangeStreamConfig.create = function create(properties) { + return new ChangeStreamConfig(properties); + }; + + /** + * Encodes the specified ChangeStreamConfig message. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeStreamConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeStreamConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeStreamConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeStreamConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeStreamConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeStreamConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeStreamConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeStreamConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeStreamConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.retentionPeriod); + if (error) + return "retentionPeriod." + error; + } + return null; + }; + + /** + * Creates a ChangeStreamConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + */ + ChangeStreamConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.ChangeStreamConfig) + return object; + var message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); + if (object.retentionPeriod != null) { + if (typeof object.retentionPeriod !== "object") + throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig.retentionPeriod: object expected"); + message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod); + } + return message; + }; + + /** + * Creates a plain object from a ChangeStreamConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.ChangeStreamConfig} message ChangeStreamConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeStreamConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.retentionPeriod = null; + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); + return object; + }; + + /** + * Converts this ChangeStreamConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @instance + * @returns {Object.} JSON object + */ + ChangeStreamConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeStreamConfig + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeStreamConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ChangeStreamConfig"; + }; + + return ChangeStreamConfig; + })(); + + v2.Table = (function() { + + /** + * 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 + */ + + /** + * 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) + 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; + + // 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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()).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()).ldelim(); + if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) + $root.google.bigtable.admin.v2.ChangeStreamConfig.encode(message.changeStreamConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.deletionProtection); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + 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()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + 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()); + break; + } + case 8: { + message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.deletionProtection = reader.bool(); + break; + } + case 13: { + message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.clusterStates != null && message.hasOwnProperty("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]]); + if (error) + return "clusterStates." + error; + } + } + if (message.columnFamilies != null && message.hasOwnProperty("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]]); + if (error) + return "columnFamilies." + error; + } + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + break; + } + if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) { + var error = $root.google.bigtable.admin.v2.RestoreInfo.verify(message.restoreInfo); + if (error) + return "restoreInfo." + error; + } + if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) { + var error = $root.google.bigtable.admin.v2.ChangeStreamConfig.verify(message.changeStreamConfig); + if (error) + return "changeStreamConfig." + error; + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + if (message.automatedBackupPolicy != null && message.hasOwnProperty("automatedBackupPolicy")) { + properties.automatedBackupConfig = 1; + { + var error = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify(message.automatedBackupPolicy); + if (error) + return "automatedBackupPolicy." + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Table) + return object; + var message = new $root.google.bigtable.admin.v2.Table(); + if (object.name != null) + message.name = String(object.name); + if (object.clusterStates) { + if (typeof object.clusterStates !== "object") + 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 (typeof object.clusterStates[keys[i]] !== "object") + 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]]); + } + } + if (object.columnFamilies) { + if (typeof object.columnFamilies !== "object") + 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 (typeof object.columnFamilies[keys[i]] !== "object") + 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]]); + } + } + 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 (typeof object.restoreInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.restoreInfo: object expected"); + message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.fromObject(object.restoreInfo); + } + if (object.changeStreamConfig != null) { + if (typeof object.changeStreamConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.changeStreamConfig: object expected"); + message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.fromObject(object.changeStreamConfig); + } + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + if (object.automatedBackupPolicy != null) { + if (typeof object.automatedBackupPolicy !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.automatedBackupPolicy: object expected"); + message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.fromObject(object.automatedBackupPolicy); + } + 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) { + if (!options) + options = {}; + 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; + } + if (message.name != null && message.hasOwnProperty("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) + object.clusterStates[keys2[j]] = $root.google.bigtable.admin.v2.Table.ClusterState.toObject(message.clusterStates[keys2[j]], options); + } + if (message.columnFamilies && (keys2 = Object.keys(message.columnFamilies)).length) { + object.columnFamilies = {}; + for (var j = 0; j < keys2.length; ++j) + object.columnFamilies[keys2[j]] = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.columnFamilies[keys2[j]], options); + } + if (message.granularity != null && message.hasOwnProperty("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 && message.hasOwnProperty("restoreInfo")) + object.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.toObject(message.restoreInfo, options); + if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) + object.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.toObject(message.changeStreamConfig, options); + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + object.deletionProtection = message.deletionProtection; + if (message.automatedBackupPolicy != null && message.hasOwnProperty("automatedBackupPolicy")) { + object.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.toObject(message.automatedBackupPolicy, options); + if (options.oneofs) + object.automatedBackupConfig = "automatedBackupPolicy"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.replicationState != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Table.ClusterState) + return object; + 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 (typeof object.encryptionInfo[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: object expected"); + message.encryptionInfo[i] = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo[i]); + } + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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); + } + 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 + */ + + /** + * 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) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + $root.google.protobuf.Duration.encode(message.frequency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.frequency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.retentionPeriod); + if (error) + return "retentionPeriod." + error; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + var error = $root.google.protobuf.Duration.verify(message.frequency); + if (error) + return "frequency." + error; + } + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy) + return object; + var message = new $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy(); + if (object.retentionPeriod != null) { + if (typeof object.retentionPeriod !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.retentionPeriod: object expected"); + message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod); + } + if (object.frequency != null) { + if (typeof object.frequency !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.frequency: object expected"); + message.frequency = $root.google.protobuf.Duration.fromObject(object.frequency); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.retentionPeriod = null; + object.frequency = null; + } + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = $root.google.protobuf.Duration.toObject(message.frequency, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 3: { + message.etag = reader.string(); + break; + } + case 4: { + message.deletionProtection = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.subsetView != null && message.hasOwnProperty("subsetView")) { + properties.authorizedView = 1; + { + var error = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.verify(message.subsetView); + if (error) + return "subsetView." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.deletionProtection != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView) + return object; + var message = new $root.google.bigtable.admin.v2.AuthorizedView(); + if (object.name != null) + message.name = String(object.name); + if (object.subsetView != null) { + if (typeof object.subsetView !== "object") + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.subsetView: object expected"); + message.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.fromObject(object.subsetView); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.deletionProtection = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.subsetView != null && message.hasOwnProperty("subsetView")) { + object.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.toObject(message.subsetView, options); + if (options.oneofs) + object.authorizedView = "subsetView"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.deletionProtection != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qualifiers != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets) + return object; + 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) { + if (!options) + options = {}; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.familySubsets[key] = value; + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowPrefixes != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]]); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.SubsetView) + return object; + 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 (typeof object.familySubsets !== "object") + 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 (typeof object.familySubsets[keys[i]] !== "object") + 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]]); + } + } + 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) { + if (!options) + options = {}; + 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) + object.familySubsets[keys2[j]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.toObject(message.familySubsets[keys2[j]], options); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.gcRule = $root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.valueType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcRule != null && message.hasOwnProperty("gcRule")) { + var error = $root.google.bigtable.admin.v2.GcRule.verify(message.gcRule); + if (error) + return "gcRule." + error; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.ColumnFamily) + return object; + var message = new $root.google.bigtable.admin.v2.ColumnFamily(); + if (object.gcRule != null) { + if (typeof object.gcRule !== "object") + throw TypeError(".google.bigtable.admin.v2.ColumnFamily.gcRule: object expected"); + message.gcRule = $root.google.bigtable.admin.v2.GcRule.fromObject(object.gcRule); + } + if (object.valueType != null) { + if (typeof object.valueType !== "object") + throw TypeError(".google.bigtable.admin.v2.ColumnFamily.valueType: object expected"); + message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcRule = null; + object.valueType = null; + } + if (message.gcRule != null && message.hasOwnProperty("gcRule")) + object.gcRule = $root.google.bigtable.admin.v2.GcRule.toObject(message.gcRule, options); + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.maxNumVersions = reader.int32(); + break; + } + case 2: { + message.maxAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.decode(reader, reader.uint32()); + break; + } + case 4: { + message.union = $root.google.bigtable.admin.v2.GcRule.Union.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { + properties.rule = 1; + if (!$util.isInteger(message.maxNumVersions)) + return "maxNumVersions: integer expected"; + } + if (message.maxAge != null && message.hasOwnProperty("maxAge")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.protobuf.Duration.verify(message.maxAge); + if (error) + return "maxAge." + error; + } + } + if (message.intersection != null && message.hasOwnProperty("intersection")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.bigtable.admin.v2.GcRule.Intersection.verify(message.intersection); + if (error) + return "intersection." + error; + } + } + if (message.union != null && message.hasOwnProperty("union")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.bigtable.admin.v2.GcRule.Union.verify(message.union); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule) + return object; + var message = new $root.google.bigtable.admin.v2.GcRule(); + if (object.maxNumVersions != null) + message.maxNumVersions = object.maxNumVersions | 0; + if (object.maxAge != null) { + if (typeof object.maxAge !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.maxAge: object expected"); + message.maxAge = $root.google.protobuf.Duration.fromObject(object.maxAge); + } + if (object.intersection != null) { + if (typeof object.intersection !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.intersection: object expected"); + message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.fromObject(object.intersection); + } + if (object.union != null) { + if (typeof object.union !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.union: object expected"); + message.union = $root.google.bigtable.admin.v2.GcRule.Union.fromObject(object.union); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { + object.maxNumVersions = message.maxNumVersions; + if (options.oneofs) + object.rule = "maxNumVersions"; + } + if (message.maxAge != null && message.hasOwnProperty("maxAge")) { + object.maxAge = $root.google.protobuf.Duration.toObject(message.maxAge, options); + if (options.oneofs) + object.rule = "maxAge"; + } + if (message.intersection != null && message.hasOwnProperty("intersection")) { + object.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.toObject(message.intersection, options); + if (options.oneofs) + object.rule = "intersection"; + } + if (message.union != null && message.hasOwnProperty("union")) { + object.union = $root.google.bigtable.admin.v2.GcRule.Union.toObject(message.union, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.bigtable.admin.v2.GcRule.verify(message.rules[i]); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule.Intersection) + return object; + 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 (typeof object.rules[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: object expected"); + message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.bigtable.admin.v2.GcRule.verify(message.rules[i]); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule.Union) + return object; + 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 (typeof object.rules[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: object expected"); + message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 3: { + message.encryptionType = reader.int32(); + break; + } + case 4: { + message.encryptionStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 2: { + message.kmsKeyVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) { + var error = $root.google.rpc.Status.verify(message.encryptionStatus); + if (error) + return "encryptionStatus." + error; + } + if (message.kmsKeyVersion != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.EncryptionInfo) + return object; + 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 (typeof object.encryptionStatus !== "object") + throw TypeError(".google.bigtable.admin.v2.EncryptionInfo.encryptionStatus: object expected"); + message.encryptionStatus = $root.google.rpc.Status.fromObject(object.encryptionStatus); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kmsKeyVersion = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + object.encryptionStatus = null; + } + if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + object.kmsKeyVersion = message.kmsKeyVersion; + if (message.encryptionType != null && message.hasOwnProperty("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 && message.hasOwnProperty("encryptionStatus")) + object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + $root.google.bigtable.admin.v2.Table.encode(message.sourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceTable = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dataSizeBytes = reader.int64(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) { + var error = $root.google.bigtable.admin.v2.Table.verify(message.sourceTable); + if (error) + return "sourceTable." + error; + } + if (message.dataSizeBytes != null && message.hasOwnProperty("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 && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.Snapshot) + return object; + var message = new $root.google.bigtable.admin.v2.Snapshot(); + if (object.name != null) + message.name = String(object.name); + if (object.sourceTable != null) { + if (typeof object.sourceTable !== "object") + throw TypeError(".google.bigtable.admin.v2.Snapshot.sourceTable: object expected"); + message.sourceTable = $root.google.bigtable.admin.v2.Table.fromObject(object.sourceTable); + } + if (object.dataSizeBytes != null) + if ($util.Long) + (message.dataSizeBytes = $util.Long.fromValue(object.dataSizeBytes)).unsigned = 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 (typeof object.createTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Snapshot.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Snapshot.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + 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) { + if (!options) + options = {}; + 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() : long; + } else + object.dataSizeBytes = options.longs === String ? "0" : 0; + object.createTime = null; + object.deleteTime = null; + object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + object.sourceTable = $root.google.bigtable.admin.v2.Table.toObject(message.sourceTable, options); + if (message.dataSizeBytes != null && message.hasOwnProperty("dataSizeBytes")) + 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 && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.state != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + case 4: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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()); + break; + } + case 11: { + message.backupType = reader.int32(); + break; + } + case 12: { + message.hotToStandardTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (!$util.isString(message.sourceTable)) + return "sourceTable: string expected"; + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (!$util.isString(message.sourceBackup)) + return "sourceBackup: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.sizeBytes != null && message.hasOwnProperty("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 && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo); + if (error) + return "encryptionInfo." + error; + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.hotToStandardTime != null && message.hasOwnProperty("hotToStandardTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.hotToStandardTime); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Backup) + return object; + 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 (typeof object.expireTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.sizeBytes != null) + if ($util.Long) + (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = 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 (typeof object.encryptionInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo); + } + 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 (typeof object.hotToStandardTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.hotToStandardTime: object expected"); + message.hotToStandardTime = $root.google.protobuf.Timestamp.fromObject(object.hotToStandardTime); + } + 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) { + if (!options) + options = {}; + 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() : long; + } else + object.sizeBytes = options.longs === String ? "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 && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + object.sourceTable = message.sourceTable; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + 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 && message.hasOwnProperty("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 && message.hasOwnProperty("encryptionInfo")) + object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options); + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + object.sourceBackup = message.sourceBackup; + if (message.backupType != null && message.hasOwnProperty("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 && message.hasOwnProperty("hotToStandardTime")) + object.hotToStandardTime = $root.google.protobuf.Timestamp.toObject(message.hotToStandardTime, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.backup = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.sourceTable = reader.string(); + break; + } + case 10: { + message.sourceBackup = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (!$util.isString(message.sourceTable)) + return "sourceTable: string expected"; + if (message.sourceBackup != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.admin.v2.BackupInfo) + return object; + var message = new $root.google.bigtable.admin.v2.BackupInfo(); + if (object.backup != null) + message.backup = String(object.backup); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.BackupInfo.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.BackupInfo.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backup = ""; + object.startTime = null; + object.endTime = null; + object.sourceTable = ""; + object.sourceBackup = ""; + } + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + object.sourceTable = message.sourceTable; + if (message.sourceBackup != null && message.hasOwnProperty("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.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 + */ + + /** + * 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) + 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; + + // 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"|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"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stringType = $root.google.bigtable.admin.v2.Type.String.decode(reader, reader.uint32()); + break; + } + case 5: { + message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.decode(reader, reader.uint32()); + break; + } + case 12: { + message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.decode(reader, reader.uint32()); + break; + } + case 9: { + message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.decode(reader, reader.uint32()); + break; + } + case 8: { + message.boolType = $root.google.bigtable.admin.v2.Type.Bool.decode(reader, reader.uint32()); + break; + } + case 10: { + message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.dateType = $root.google.bigtable.admin.v2.Type.Date.decode(reader, reader.uint32()); + break; + } + case 6: { + message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.decode(reader, reader.uint32()); + break; + } + case 7: { + message.structType = $root.google.bigtable.admin.v2.Type.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.arrayType = $root.google.bigtable.admin.v2.Type.Array.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mapType = $root.google.bigtable.admin.v2.Type.Map.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType); + if (error) + return "bytesType." + error; + } + } + if (message.stringType != null && message.hasOwnProperty("stringType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.String.verify(message.stringType); + if (error) + return "stringType." + error; + } + } + if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Int64.verify(message.int64Type); + if (error) + return "int64Type." + error; + } + } + if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Float32.verify(message.float32Type); + if (error) + return "float32Type." + error; + } + } + if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Float64.verify(message.float64Type); + if (error) + return "float64Type." + error; + } + } + if (message.boolType != null && message.hasOwnProperty("boolType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bool.verify(message.boolType); + if (error) + return "boolType." + error; + } + } + if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Timestamp.verify(message.timestampType); + if (error) + return "timestampType." + error; + } + } + if (message.dateType != null && message.hasOwnProperty("dateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Date.verify(message.dateType); + if (error) + return "dateType." + error; + } + } + if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.verify(message.aggregateType); + if (error) + return "aggregateType." + error; + } + } + if (message.structType != null && message.hasOwnProperty("structType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Struct.verify(message.structType); + if (error) + return "structType." + error; + } + } + if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Array.verify(message.arrayType); + if (error) + return "arrayType." + error; + } + } + if (message.mapType != null && message.hasOwnProperty("mapType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Map.verify(message.mapType); + if (error) + return "mapType." + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type) + return object; + var message = new $root.google.bigtable.admin.v2.Type(); + if (object.bytesType != null) { + if (typeof object.bytesType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.bytesType: object expected"); + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.fromObject(object.bytesType); + } + if (object.stringType != null) { + if (typeof object.stringType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.stringType: object expected"); + message.stringType = $root.google.bigtable.admin.v2.Type.String.fromObject(object.stringType); + } + if (object.int64Type != null) { + if (typeof object.int64Type !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.int64Type: object expected"); + message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.fromObject(object.int64Type); + } + if (object.float32Type != null) { + if (typeof object.float32Type !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.float32Type: object expected"); + message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.fromObject(object.float32Type); + } + if (object.float64Type != null) { + if (typeof object.float64Type !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.float64Type: object expected"); + message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.fromObject(object.float64Type); + } + if (object.boolType != null) { + if (typeof object.boolType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.boolType: object expected"); + message.boolType = $root.google.bigtable.admin.v2.Type.Bool.fromObject(object.boolType); + } + if (object.timestampType != null) { + if (typeof object.timestampType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.timestampType: object expected"); + message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.fromObject(object.timestampType); + } + if (object.dateType != null) { + if (typeof object.dateType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.dateType: object expected"); + message.dateType = $root.google.bigtable.admin.v2.Type.Date.fromObject(object.dateType); + } + if (object.aggregateType != null) { + if (typeof object.aggregateType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.aggregateType: object expected"); + message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.fromObject(object.aggregateType); + } + if (object.structType != null) { + if (typeof object.structType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.structType: object expected"); + message.structType = $root.google.bigtable.admin.v2.Type.Struct.fromObject(object.structType); + } + if (object.arrayType != null) { + if (typeof object.arrayType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.arrayType: object expected"); + message.arrayType = $root.google.bigtable.admin.v2.Type.Array.fromObject(object.arrayType); + } + if (object.mapType != null) { + if (typeof object.mapType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.mapType: object expected"); + message.mapType = $root.google.bigtable.admin.v2.Type.Map.fromObject(object.mapType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options); + if (options.oneofs) + object.kind = "bytesType"; + } + if (message.stringType != null && message.hasOwnProperty("stringType")) { + object.stringType = $root.google.bigtable.admin.v2.Type.String.toObject(message.stringType, options); + if (options.oneofs) + object.kind = "stringType"; + } + if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + object.arrayType = $root.google.bigtable.admin.v2.Type.Array.toObject(message.arrayType, options); + if (options.oneofs) + object.kind = "arrayType"; + } + if (message.mapType != null && message.hasOwnProperty("mapType")) { + object.mapType = $root.google.bigtable.admin.v2.Type.Map.toObject(message.mapType, options); + if (options.oneofs) + object.kind = "mapType"; + } + if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + object.int64Type = $root.google.bigtable.admin.v2.Type.Int64.toObject(message.int64Type, options); + if (options.oneofs) + object.kind = "int64Type"; + } + if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + object.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.toObject(message.aggregateType, options); + if (options.oneofs) + object.kind = "aggregateType"; + } + if (message.structType != null && message.hasOwnProperty("structType")) { + object.structType = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.structType, options); + if (options.oneofs) + object.kind = "structType"; + } + if (message.boolType != null && message.hasOwnProperty("boolType")) { + object.boolType = $root.google.bigtable.admin.v2.Type.Bool.toObject(message.boolType, options); + if (options.oneofs) + object.kind = "boolType"; + } + if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + object.float64Type = $root.google.bigtable.admin.v2.Type.Float64.toObject(message.float64Type, options); + if (options.oneofs) + object.kind = "float64Type"; + } + if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + object.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.toObject(message.timestampType, options); + if (options.oneofs) + object.kind = "timestampType"; + } + if (message.dateType != null && message.hasOwnProperty("dateType")) { + object.dateType = $root.google.bigtable.admin.v2.Type.Date.toObject(message.dateType, options); + if (options.oneofs) + object.kind = "dateType"; + } + if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + object.float32Type = $root.google.bigtable.admin.v2.Type.Float32.toObject(message.float32Type, options); + if (options.oneofs) + object.kind = "float32Type"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.verify(message.encoding); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Bytes(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Bytes.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.fromObject(object.encoding); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.toObject(message.encoding, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.raw != null && message.hasOwnProperty("raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify(message.raw); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes.Encoding) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Bytes.Encoding(); + if (object.raw != null) { + if (typeof object.raw !== "object") + 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); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.raw != null && message.hasOwnProperty("raw")) { + object.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.admin.v2.Type.String.Encoding.verify(message.encoding); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.String) + return object; + var message = new $root.google.bigtable.admin.v2.Type.String(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.String.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.fromObject(object.encoding); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.toObject(message.encoding, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.decode(reader, reader.uint32()); + break; + } + case 2: { + message.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw); + if (error) + return "utf8Raw." + error; + } + } + if (message.utf8Bytes != null && message.hasOwnProperty("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); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.String.Encoding) + return object; + var message = new $root.google.bigtable.admin.v2.Type.String.Encoding(); + if (object.utf8Raw != null) { + if (typeof object.utf8Raw !== "object") + 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); + } + if (object.utf8Bytes != null) { + if (typeof object.utf8Bytes !== "object") + 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); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { + object.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options); + if (options.oneofs) + object.encoding = "utf8Raw"; + } + if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { + object.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.verify(message.encoding); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Int64(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Int64.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.fromObject(object.encoding); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.encoding, options); + 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 + */ + + /** + * 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) + 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; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"bigEndianBytes"|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["bigEndianBytes"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes); + if (error) + return "bigEndianBytes." + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding(); + if (object.bigEndianBytes != null) { + if (typeof object.bigEndianBytes !== "object") + 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); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + object.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options); + if (options.oneofs) + object.encoding = "bigEndianBytes"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(); + if (object.bytesType != null) { + if (typeof object.bytesType !== "object") + 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); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bytesType = null; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) + object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options); + 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; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Timestamp) + return object; + return new $root.google.bigtable.admin.v2.Type.Timestamp(); + }; + + /** + * 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() { + return {}; + }; + + /** + * 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"; + }; + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Array.} fields + * @memberof google.bigtable.admin.v2.Type.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyArray; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.bigtable.admin.v2.Type.Struct.Field.verify(message.fields[i]); + if (error) + return "fields." + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct) + return object; + 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 (typeof object.fields[i] !== "object") + 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]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.admin.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.type); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Field) + return object; + 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 (typeof object.type !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Field.type: object expected"); + message.type = $root.google.bigtable.admin.v2.Type.fromObject(object.type); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.type = null; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = $root.google.bigtable.admin.v2.Type.toObject(message.type, options); + 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; + })(); + + return Struct; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.elementType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.elementType != null && message.hasOwnProperty("elementType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.elementType); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Array) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Array(); + if (object.elementType != null) { + if (typeof object.elementType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Array.elementType: object expected"); + message.elementType = $root.google.bigtable.admin.v2.Type.fromObject(object.elementType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.elementType = null; + if (message.elementType != null && message.hasOwnProperty("elementType")) + object.elementType = $root.google.bigtable.admin.v2.Type.toObject(message.elementType, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.keyType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.valueType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyType != null && message.hasOwnProperty("keyType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.keyType); + if (error) + return "keyType." + error; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Map) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Map(); + if (object.keyType != null) { + if (typeof object.keyType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Map.keyType: object expected"); + message.keyType = $root.google.bigtable.admin.v2.Type.fromObject(object.keyType); + } + if (object.valueType != null) { + if (typeof object.valueType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Map.valueType: object expected"); + message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyType = null; + object.valueType = null; + } + if (message.keyType != null && message.hasOwnProperty("keyType")) + object.keyType = $root.google.bigtable.admin.v2.Type.toObject(message.keyType, options); + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.inputType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stateType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + case 4: { + message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.decode(reader, reader.uint32()); + break; + } + case 5: { + message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.decode(reader, reader.uint32()); + break; + } + case 6: { + message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.decode(reader, reader.uint32()); + break; + } + case 7: { + message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inputType != null && message.hasOwnProperty("inputType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.inputType); + if (error) + return "inputType." + error; + } + if (message.stateType != null && message.hasOwnProperty("stateType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.stateType); + if (error) + return "stateType." + error; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + properties.aggregator = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.verify(message.sum); + if (error) + return "sum." + error; + } + } + if (message.hllppUniqueCount != null && message.hasOwnProperty("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); + if (error) + return "hllppUniqueCount." + error; + } + } + if (message.max != null && message.hasOwnProperty("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); + if (error) + return "max." + error; + } + } + if (message.min != null && message.hasOwnProperty("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); + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Aggregate(); + if (object.inputType != null) { + if (typeof object.inputType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.inputType: object expected"); + message.inputType = $root.google.bigtable.admin.v2.Type.fromObject(object.inputType); + } + if (object.stateType != null) { + if (typeof object.stateType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.stateType: object expected"); + message.stateType = $root.google.bigtable.admin.v2.Type.fromObject(object.stateType); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.sum: object expected"); + message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.fromObject(object.sum); + } + if (object.hllppUniqueCount != null) { + if (typeof object.hllppUniqueCount !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.hllppUniqueCount: object expected"); + message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount); + } + if (object.max != null) { + if (typeof object.max !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.max: object expected"); + message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.fromObject(object.max); + } + if (object.min != null) { + if (typeof object.min !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.min: object expected"); + message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.fromObject(object.min); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputType = null; + object.stateType = null; + } + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = $root.google.bigtable.admin.v2.Type.toObject(message.inputType, options); + if (message.stateType != null && message.hasOwnProperty("stateType")) + object.stateType = $root.google.bigtable.admin.v2.Type.toObject(message.stateType, options); + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.toObject(message.sum, options); + if (options.oneofs) + object.aggregator = "sum"; + } + if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { + object.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options); + if (options.oneofs) + object.aggregator = "hllppUniqueCount"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.toObject(message.max, options); + if (options.oneofs) + object.aggregator = "max"; + } + if (message.min != null && message.hasOwnProperty("min")) { + object.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.toObject(message.min, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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; + })(); + + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * 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) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + 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).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + 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 (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + 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); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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); + break; + } + } + 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); + break; + } + } + 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); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++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) + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @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; + })(); + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN 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[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} [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.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + 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) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + 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_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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("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]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + 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 (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.verification != null && message.hasOwnProperty("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 && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_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 (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 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()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.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 (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions 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.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {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 {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) + 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 uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.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()).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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + 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()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 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())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.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 (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.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[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.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); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + 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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + 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_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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("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; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions 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 uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + 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).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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())); + 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); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".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) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".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.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions 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.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.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) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.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 + */ + + /** + * 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) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + 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) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + 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; + } + 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) { + if (!options) + options = {}; + 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; + } + if (message.fieldPresence != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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; + 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; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("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]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + 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 && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + 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) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + 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 (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + 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_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_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) { + if (!options) + options = {}; + 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); + } + if (message.minimumEdition != null && message.hasOwnProperty("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 && message.hasOwnProperty("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} [features] FeatureSetEditionDefault features + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = 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) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + 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) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + 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_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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("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 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + 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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + object.updateMask = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + 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) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.permissions != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + 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) { + if (!options) + options = {}; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("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]); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && message.hasOwnProperty("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]); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + 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 (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + 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 (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("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); + } + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("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 && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + 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) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + 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 (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("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 && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + 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 (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("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]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + 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 (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + 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 (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + 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) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + 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 (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("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 && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("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 && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.type.Expr) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("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; + })(); + + 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 this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an 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) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/admin/v2/protos/protos.json b/owl-bot-staging/admin/v2/protos/protos.json new file mode 100644 index 000000000..1fc3774d1 --- /dev/null +++ b/owl-bot-staging/admin/v2/protos/protos.json @@ -0,0 +1,6161 @@ +{ + "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" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/appProfiles/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "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.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}: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.method_signature)": "resource,policy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}: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.method_signature)": "resource,permissions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}: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" + } + ] + } + } + }, + "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 + } + } + }, + "Instance": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/Instance", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}" + }, + "oneofs": { + "_satisfiesPzs": { + "oneof": [ + "satisfiesPzs" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 3 + }, + "type": { + "type": "Type", + "id": 4 + }, + "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 + } + } + }, + "nested": { + "State": { + "values": { + "STATE_NOT_KNOWN": 0, + "READY": 1, + "CREATING": 2 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "PRODUCTION": 1, + "DEVELOPMENT": 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}" + }, + "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 + }, + "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 + } + }, + "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}" + }, + "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": { + "fields": { + "clusterIds": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "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}" + }, + "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" + } + } + } + }, + "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/*/clusters/*/backups/*}: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": "*" + } + } + }, + { + "(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/*/clusters/*/backups/*}: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": "*" + } + } + }, + { + "(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/*/clusters/*/backups/*}: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": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,permissions" + } + ] + } + } + }, + "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" + } + } + } + }, + "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" + } + } + } + }, + "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 + } + }, + "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, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "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 + } + }, + "Type": { + "oneofs": { + "kind": { + "oneof": [ + "bytesType", + "stringType", + "int64Type", + "float32Type", + "float64Type", + "boolType", + "timestampType", + "dateType", + "aggregateType", + "structType", + "arrayType", + "mapType" + ] + } + }, + "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 + } + }, + "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" + ] + } + }, + "fields": { + "bigEndianBytes": { + "type": "BigEndianBytes", + "id": 1 + } + }, + "nested": { + "BigEndianBytes": { + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1 + } + } + } + } + } + } + }, + "Bool": { + "fields": {} + }, + "Float32": { + "fields": {} + }, + "Float64": { + "fields": {} + }, + "Timestamp": { + "fields": {} + }, + "Date": { + "fields": {} + }, + "Struct": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1 + } + }, + "nested": { + "Field": { + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "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": {} + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "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 + } + } + }, + "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 + } + } + }, + "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 + } + } + }, + "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 + } + }, + "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 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "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": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "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 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "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": { + "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 + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "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 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "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": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "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": { + "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": { + "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": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 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 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "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 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "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": {} + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "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" + }, + "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/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + }, + "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", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_app_profile.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_app_profile.js new file mode 100644 index 000000000..d601d585c --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_app_profile.js @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_cluster.js new file mode 100644 index 000000000..1a1602bb9 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_cluster.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_instance.js new file mode 100644 index 000000000..9e9adbce9 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_instance.js @@ -0,0 +1,85 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. + * Currently, at most four clusters can be specified. + */ + // const clusters = [1,2,3,4] + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js new file mode 100644 index 000000000..20018edcc --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_cluster.js new file mode 100644 index 000000000..55ac73087 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_cluster.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_instance.js new file mode 100644 index 000000000..8c80885c8 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_instance.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_app_profile.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_app_profile.js new file mode 100644 index 000000000..0e2b9c72b --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_app_profile.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_cluster.js new file mode 100644 index 000000000..2d5188b36 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_cluster.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js new file mode 100644 index 000000000..15ea1d6cd --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_instance.js new file mode 100644 index 000000000..b5e947016 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_instance.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js new file mode 100644 index 000000000..409c049d6 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js @@ -0,0 +1,81 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_clusters.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_clusters.js new file mode 100644 index 000000000..9df1ed7b3 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_clusters.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js new file mode 100644 index 000000000..73eb76242 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js @@ -0,0 +1,92 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_instances.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_instances.js new file mode 100644 index 000000000..f5ce2ba39 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_instances.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js new file mode 100644 index 000000000..1d7bfa098 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js new file mode 100644 index 000000000..3bb32a5d0 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js new file mode 100644 index 000000000..acd627f01 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js new file mode 100644 index 000000000..df5a650c8 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_app_profile.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_app_profile.js new file mode 100644 index 000000000..347e0cfbe --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_app_profile.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_cluster.js new file mode 100644 index 000000000..abb3389e4 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_cluster.js @@ -0,0 +1,95 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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, 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 allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. + */ + // const serveNodes = 1234 + /** + * 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').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callUpdateCluster() { + // Construct request + const request = { + location, + state, + 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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_instance.js new file mode 100644 index 000000000..4f14b246f --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_instance.js @@ -0,0 +1,102 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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, createTime, satisfiesPzs) { + // [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' + /** + * (`OutputOnly`) + * The current state of the instance. + */ + // const state = {} + /** + * The type of the instance. Defaults to `PRODUCTION`. + */ + // const type = {} + /** + * 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 server-assigned 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 + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callUpdateInstance() { + // Construct request + const request = { + displayName, + createTime, + satisfiesPzs, + }; + + // 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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.check_consistency.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.check_consistency.js new file mode 100644 index 000000000..e36b88599 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.check_consistency.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.copy_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.copy_backup.js new file mode 100644 index 000000000..61b173330 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.copy_backup.js @@ -0,0 +1,94 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_authorized_view.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_authorized_view.js new file mode 100644 index 000000000..7be88c26f --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_authorized_view.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_backup.js new file mode 100644 index 000000000..169ba6a0a --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_backup.js @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table.js new file mode 100644 index 000000000..91a4b1010 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table.js @@ -0,0 +1,91 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js new file mode 100644 index 000000000..00b4e9e0b --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js new file mode 100644 index 000000000..6e9976054 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js @@ -0,0 +1,70 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_backup.js new file mode 100644 index 000000000..445972758 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_backup.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_snapshot.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_snapshot.js new file mode 100644 index 000000000..c186cbbb3 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_snapshot.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_table.js new file mode 100644 index 000000000..115c0f650 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_table.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.drop_row_range.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.drop_row_range.js new file mode 100644 index 000000000..2006e896e --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.drop_row_range.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js new file mode 100644 index 000000000..109c5a1d4 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_authorized_view.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_authorized_view.js new file mode 100644 index 000000000..6a6167f32 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_authorized_view.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_backup.js new file mode 100644 index 000000000..5968603e3 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_backup.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_iam_policy.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_iam_policy.js new file mode 100644 index 000000000..60ef6680f --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_snapshot.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_snapshot.js new file mode 100644 index 000000000..8fa21ae32 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_snapshot.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_table.js new file mode 100644 index 000000000..48ad667c3 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_table.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_authorized_views.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_authorized_views.js new file mode 100644 index 000000000..5cf0bfec3 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_authorized_views.js @@ -0,0 +1,84 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 views' fields. + * Default to NAME_ONLY. + */ + // const view = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_backups.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_backups.js new file mode 100644 index 000000000..1a6c3f296 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_backups.js @@ -0,0 +1,131 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_snapshots.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_snapshots.js new file mode 100644 index 000000000..169a77cb2 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_snapshots.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_tables.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_tables.js new file mode 100644 index 000000000..d50bbd024 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_tables.js @@ -0,0 +1,83 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.modify_column_families.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.modify_column_families.js new file mode 100644 index 000000000..6835f6bc5 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.modify_column_families.js @@ -0,0 +1,75 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.restore_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.restore_table.js new file mode 100644 index 000000000..86ab4d49a --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.restore_table.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.set_iam_policy.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.set_iam_policy.js new file mode 100644 index 000000000..fc874dd9f --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.snapshot_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.snapshot_table.js new file mode 100644 index 000000000..ce474124b --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.snapshot_table.js @@ -0,0 +1,90 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js new file mode 100644 index 000000000..6c49f13e3 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.undelete_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.undelete_table.js new file mode 100644 index 000000000..743cbb7dc --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.undelete_table.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_authorized_view.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_authorized_view.js new file mode 100644 index 000000000..405f9fb24 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_authorized_view.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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//instances//tables/
/authorizedViews/ + */ + // 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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_backup.js new file mode 100644 index 000000000..ea695ffbb --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_backup.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_table.js new file mode 100644 index 000000000..181a44e26 --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_table.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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` + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable').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/owl-bot-staging/admin/v2/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json b/owl-bot-staging/admin/v2/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json new file mode 100644 index 000000000..fbcdccc1e --- /dev/null +++ b/owl-bot-staging/admin/v2/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json @@ -0,0 +1,2395 @@ +{ + "clientLibrary": { + "name": "nodejs-admin", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.bigtable.admin.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async", + "title": "bigtable createInstance Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_instance_admin.create_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "instance_id", + "type": "TYPE_STRING" + }, + { + "name": "instance", + "type": ".google.bigtable.admin.v2.Instance" + }, + { + "name": "clusters", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async", + "title": "bigtable getInstance Sample", + "origin": "API_DEFINITION", + "description": " Gets information about an instance.", + "canonical": true, + "file": "bigtable_instance_admin.get_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.Instance", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async", + "title": "bigtable listInstances Sample", + "origin": "API_DEFINITION", + "description": " Lists information about instances in a project.", + "canonical": true, + "file": "bigtable_instance_admin.list_instances.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInstances", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.ListInstancesResponse", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async", + "title": "bigtable updateInstance Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_instance_admin.update_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 94, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "display_name", + "type": "TYPE_STRING" + }, + { + "name": "state", + "type": ".google.bigtable.admin.v2.Instance.State" + }, + { + "name": "type", + "type": ".google.bigtable.admin.v2.Instance.Type" + }, + { + "name": "labels", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "create_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "satisfies_pzs", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.bigtable.admin.v2.Instance", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async", + "title": "bigtable partialUpdateInstance Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_instance_admin.partial_update_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PartialUpdateInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", + "async": true, + "parameters": [ + { + "name": "instance", + "type": ".google.bigtable.admin.v2.Instance" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "PartialUpdateInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async", + "title": "bigtable deleteInstance Sample", + "origin": "API_DEFINITION", + "description": " Delete an instance from a project.", + "canonical": true, + "file": "bigtable_instance_admin.delete_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async", + "title": "bigtable createCluster Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_instance_admin.create_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "cluster", + "type": ".google.bigtable.admin.v2.Cluster" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "CreateCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async", + "title": "bigtable getCluster Sample", + "origin": "API_DEFINITION", + "description": " Gets information about a cluster.", + "canonical": true, + "file": "bigtable_instance_admin.get_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.Cluster", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "GetCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async", + "title": "bigtable listClusters Sample", + "origin": "API_DEFINITION", + "description": " Lists information about clusters in an instance.", + "canonical": true, + "file": "bigtable_instance_admin.list_clusters.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListClusters", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.ListClustersResponse", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "ListClusters", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async", + "title": "bigtable updateCluster Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_instance_admin.update_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "location", + "type": "TYPE_STRING" + }, + { + "name": "state", + "type": ".google.bigtable.admin.v2.Cluster.State" + }, + { + "name": "serve_nodes", + "type": "TYPE_INT32" + }, + { + "name": "cluster_config", + "type": ".google.bigtable.admin.v2.Cluster.ClusterConfig" + }, + { + "name": "default_storage_type", + "type": ".google.bigtable.admin.v2.StorageType" + }, + { + "name": "encryption_config", + "type": ".google.bigtable.admin.v2.Cluster.EncryptionConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "UpdateCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async", + "title": "bigtable partialUpdateCluster Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_instance_admin.partial_update_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PartialUpdateCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", + "async": true, + "parameters": [ + { + "name": "cluster", + "type": ".google.bigtable.admin.v2.Cluster" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "PartialUpdateCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async", + "title": "bigtable deleteCluster Sample", + "origin": "API_DEFINITION", + "description": " Deletes a cluster from an instance.", + "canonical": true, + "file": "bigtable_instance_admin.delete_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "DeleteCluster", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async", + "title": "bigtable createAppProfile Sample", + "origin": "API_DEFINITION", + "description": " Creates an app profile within an instance.", + "canonical": true, + "file": "bigtable_instance_admin.create_app_profile.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAppProfile", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "app_profile", + "type": ".google.bigtable.admin.v2.AppProfile" + }, + { + "name": "ignore_warnings", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.bigtable.admin.v2.AppProfile", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "CreateAppProfile", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async", + "title": "bigtable getAppProfile Sample", + "origin": "API_DEFINITION", + "description": " Gets information about an app profile.", + "canonical": true, + "file": "bigtable_instance_admin.get_app_profile.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAppProfile", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.AppProfile", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "GetAppProfile", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async", + "title": "bigtable listAppProfiles Sample", + "origin": "API_DEFINITION", + "description": " Lists information about app profiles in an instance.", + "canonical": true, + "file": "bigtable_instance_admin.list_app_profiles.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAppProfiles", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.ListAppProfilesResponse", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "ListAppProfiles", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async", + "title": "bigtable updateAppProfile Sample", + "origin": "API_DEFINITION", + "description": " Updates an app profile within an instance.", + "canonical": true, + "file": "bigtable_instance_admin.update_app_profile.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAppProfile", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", + "async": true, + "parameters": [ + { + "name": "app_profile", + "type": ".google.bigtable.admin.v2.AppProfile" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "ignore_warnings", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "UpdateAppProfile", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async", + "title": "bigtable deleteAppProfile Sample", + "origin": "API_DEFINITION", + "description": " Deletes an app profile from an instance.", + "canonical": true, + "file": "bigtable_instance_admin.delete_app_profile.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAppProfile", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "ignore_warnings", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "DeleteAppProfile", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async", + "title": "bigtable getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.", + "canonical": true, + "file": "bigtable_instance_admin.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async", + "title": "bigtable setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the access control policy on an instance resource. Replaces any existing policy.", + "canonical": true, + "file": "bigtable_instance_admin.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async", + "title": "bigtable testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns permissions that the caller has on the specified instance resource.", + "canonical": true, + "file": "bigtable_instance_admin.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async", + "title": "bigtable listHotTablets Sample", + "origin": "API_DEFINITION", + "description": " Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage.", + "canonical": true, + "file": "bigtable_instance_admin.list_hot_tablets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListHotTablets", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "start_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "end_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.ListHotTabletsResponse", + "client": { + "shortName": "BigtableInstanceAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" + }, + "method": { + "shortName": "ListHotTablets", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", + "service": { + "shortName": "BigtableInstanceAdmin", + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async", + "title": "bigtable createTable Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.create_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 83, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "table_id", + "type": "TYPE_STRING" + }, + { + "name": "table", + "type": ".google.bigtable.admin.v2.Table" + }, + { + "name": "initial_splits", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.bigtable.admin.v2.Table", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "CreateTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async", + "title": "bigtable createTableFromSnapshot Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.create_table_from_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTableFromSnapshot", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "table_id", + "type": "TYPE_STRING" + }, + { + "name": "source_snapshot", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "CreateTableFromSnapshot", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async", + "title": "bigtable listTables Sample", + "origin": "API_DEFINITION", + "description": " Lists all tables served from a specified instance.", + "canonical": true, + "file": "bigtable_table_admin.list_tables.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTables", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.bigtable.admin.v2.Table.View" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.ListTablesResponse", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "ListTables", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async", + "title": "bigtable getTable Sample", + "origin": "API_DEFINITION", + "description": " Gets metadata information about the specified table.", + "canonical": true, + "file": "bigtable_table_admin.get_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.bigtable.admin.v2.Table.View" + } + ], + "resultType": ".google.bigtable.admin.v2.Table", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "GetTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async", + "title": "bigtable updateTable Sample", + "origin": "API_DEFINITION", + "description": " Updates a specified table.", + "canonical": true, + "file": "bigtable_table_admin.update_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", + "async": true, + "parameters": [ + { + "name": "table", + "type": ".google.bigtable.admin.v2.Table" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "UpdateTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async", + "title": "bigtable deleteTable Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a specified table and all of its data.", + "canonical": true, + "file": "bigtable_table_admin.delete_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "DeleteTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async", + "title": "bigtable undeleteTable Sample", + "origin": "API_DEFINITION", + "description": " Restores a specified table which was accidentally deleted.", + "canonical": true, + "file": "bigtable_table_admin.undelete_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeleteTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "UndeleteTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async", + "title": "bigtable createAuthorizedView Sample", + "origin": "API_DEFINITION", + "description": " Creates a new AuthorizedView in a table.", + "canonical": true, + "file": "bigtable_table_admin.create_authorized_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view_id", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view", + "type": ".google.bigtable.admin.v2.AuthorizedView" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "CreateAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async", + "title": "bigtable listAuthorizedViews Sample", + "origin": "API_DEFINITION", + "description": " Lists all AuthorizedViews from a specific table.", + "canonical": true, + "file": "bigtable_table_admin.list_authorized_views.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAuthorizedViews", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.bigtable.admin.v2.AuthorizedView.ResponseView" + } + ], + "resultType": ".google.bigtable.admin.v2.ListAuthorizedViewsResponse", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "ListAuthorizedViews", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async", + "title": "bigtable getAuthorizedView Sample", + "origin": "API_DEFINITION", + "description": " Gets information from a specified AuthorizedView.", + "canonical": true, + "file": "bigtable_table_admin.get_authorized_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.bigtable.admin.v2.AuthorizedView.ResponseView" + } + ], + "resultType": ".google.bigtable.admin.v2.AuthorizedView", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "GetAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async", + "title": "bigtable updateAuthorizedView Sample", + "origin": "API_DEFINITION", + "description": " Updates an AuthorizedView in a table.", + "canonical": true, + "file": "bigtable_table_admin.update_authorized_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView", + "async": true, + "parameters": [ + { + "name": "authorized_view", + "type": ".google.bigtable.admin.v2.AuthorizedView" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "ignore_warnings", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "UpdateAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async", + "title": "bigtable deleteAuthorizedView Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a specified AuthorizedView.", + "canonical": true, + "file": "bigtable_table_admin.delete_authorized_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "DeleteAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async", + "title": "bigtable modifyColumnFamilies Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.modify_column_families.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ModifyColumnFamilies", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "modifications", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "ignore_warnings", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.bigtable.admin.v2.Table", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "ModifyColumnFamilies", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async", + "title": "bigtable dropRowRange Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.drop_row_range.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DropRowRange", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "row_key_prefix", + "type": "TYPE_BYTES" + }, + { + "name": "delete_all_data_from_table", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "DropRowRange", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async", + "title": "bigtable generateConsistencyToken Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.generate_consistency_token.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateConsistencyToken", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.GenerateConsistencyTokenResponse", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "GenerateConsistencyToken", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async", + "title": "bigtable checkConsistency Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.check_consistency.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckConsistency", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "consistency_token", + "type": "TYPE_STRING" + }, + { + "name": "standard_read_remote_writes", + "type": ".google.bigtable.admin.v2.StandardReadRemoteWrites" + }, + { + "name": "data_boost_read_local_writes", + "type": ".google.bigtable.admin.v2.DataBoostReadLocalWrites" + } + ], + "resultType": ".google.bigtable.admin.v2.CheckConsistencyResponse", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "CheckConsistency", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async", + "title": "bigtable snapshotTable Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.snapshot_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SnapshotTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "cluster", + "type": "TYPE_STRING" + }, + { + "name": "snapshot_id", + "type": "TYPE_STRING" + }, + { + "name": "ttl", + "type": ".google.protobuf.Duration" + }, + { + "name": "description", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "SnapshotTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async", + "title": "bigtable getSnapshot Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.get_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSnapshot", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.Snapshot", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "GetSnapshot", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async", + "title": "bigtable listSnapshots Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.list_snapshots.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSnapshots", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.ListSnapshotsResponse", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "ListSnapshots", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async", + "title": "bigtable deleteSnapshot Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.delete_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSnapshot", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "DeleteSnapshot", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async", + "title": "bigtable createBackup Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.create_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + }, + { + "name": "backup", + "type": ".google.bigtable.admin.v2.Backup" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "CreateBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async", + "title": "bigtable getBackup Sample", + "origin": "API_DEFINITION", + "description": " Gets metadata on a pending or completed Cloud Bigtable Backup.", + "canonical": true, + "file": "bigtable_table_admin.get_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.Backup", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "GetBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async", + "title": "bigtable updateBackup Sample", + "origin": "API_DEFINITION", + "description": " Updates a pending or completed Cloud Bigtable Backup.", + "canonical": true, + "file": "bigtable_table_admin.update_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", + "async": true, + "parameters": [ + { + "name": "backup", + "type": ".google.bigtable.admin.v2.Backup" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.bigtable.admin.v2.Backup", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "UpdateBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async", + "title": "bigtable deleteBackup Sample", + "origin": "API_DEFINITION", + "description": " Deletes a pending or completed Cloud Bigtable backup.", + "canonical": true, + "file": "bigtable_table_admin.delete_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "DeleteBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async", + "title": "bigtable listBackups Sample", + "origin": "API_DEFINITION", + "description": " Lists Cloud Bigtable backups. Returns both completed and pending backups.", + "canonical": true, + "file": "bigtable_table_admin.list_backups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 123, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackups", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.admin.v2.ListBackupsResponse", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "ListBackups", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async", + "title": "bigtable restoreTable Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": true, + "file": "bigtable_table_admin.restore_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestoreTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "table_id", + "type": "TYPE_STRING" + }, + { + "name": "backup", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "RestoreTable", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async", + "title": "bigtable copyBackup Sample", + "origin": "API_DEFINITION", + "description": " Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.", + "canonical": true, + "file": "bigtable_table_admin.copy_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CopyBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + }, + { + "name": "source_backup", + "type": "TYPE_STRING" + }, + { + "name": "expire_time", + "type": ".google.protobuf.Timestamp" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "CopyBackup", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async", + "title": "bigtable getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the access control policy for a Table or Backup resource. Returns an empty policy if the resource exists but does not have a policy set.", + "canonical": true, + "file": "bigtable_table_admin.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async", + "title": "bigtable setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the access control policy on a Table or Backup resource. Replaces any existing policy.", + "canonical": true, + "file": "bigtable_table_admin.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async", + "title": "bigtable testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns permissions that the caller has on the specified Table or Backup resource.", + "canonical": true, + "file": "bigtable_table_admin.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + } + ] +} diff --git a/owl-bot-staging/admin/v2/src/index.ts b/owl-bot-staging/admin/v2/src/index.ts new file mode 100644 index 000000000..69e15fa31 --- /dev/null +++ b/owl-bot-staging/admin/v2/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 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/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client.ts b/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client.ts new file mode 100644 index 000000000..2e11bb740 --- /dev/null +++ b/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client.ts @@ -0,0 +1,2951 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/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; + 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://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [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}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + 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') + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + 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; + + 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)) + }; + + // 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']; + 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(); + return this.innerApiCalls.getInstance(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.listInstances(request, options, callback); + } +/** + * 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 + * (`OutputOnly`) + * The current state of the instance. + * @param {google.bigtable.admin.v2.Instance.Type} request.type + * The type of the instance. Defaults to `PRODUCTION`. + * @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 server-assigned 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 {object} [options] + * Call options. See {@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(); + return this.innerApiCalls.updateInstance(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.deleteInstance(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.getCluster(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.listClusters(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.deleteCluster(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.createAppProfile(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.getAppProfile(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.deleteAppProfile(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.getIamPolicy(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.setIamPolicy(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.testIamPermissions(request, options, callback); + } + +/** + * 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. + * Currently, at most four clusters can be specified. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + createInstance( + request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createInstance( + request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createInstance( + request?: protos.google.bigtable.admin.v2.ICreateInstanceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createInstance(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + partialUpdateInstance( + request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + partialUpdateInstance( + request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + partialUpdateInstance( + request?: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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(); + return this.innerApiCalls.partialUpdateInstance(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + createCluster( + request: protos.google.bigtable.admin.v2.ICreateClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createCluster( + request: protos.google.bigtable.admin.v2.ICreateClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createCluster( + request?: protos.google.bigtable.admin.v2.ICreateClusterRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCluster(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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 allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. + * @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.longrunning.IOperation|undefined, {}|undefined + ]>; + updateCluster( + request: protos.google.bigtable.admin.v2.ICluster, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateCluster( + request: protos.google.bigtable.admin.v2.ICluster, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateCluster( + request?: protos.google.bigtable.admin.v2.ICluster, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateCluster(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + partialUpdateCluster( + request: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + partialUpdateCluster( + request: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + partialUpdateCluster( + request?: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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(); + return this.innerApiCalls.partialUpdateCluster(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAppProfile( + request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAppProfile( + request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAppProfile( + request?: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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(); + return this.innerApiCalls.updateAppProfile(request, options, callback); + } +/** + * 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>{ + 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; + } + /** + * 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(); + return this.innerApiCalls.listAppProfiles(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The 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(); + 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(); + 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(); + return this.innerApiCalls.listHotTablets(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The 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(); + 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(); + return this.descriptors.page.listHotTablets.asyncIterate( + this.innerApiCalls['listHotTablets'] 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 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 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._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client_config.json b/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client_config.json new file mode 100644 index 000000000..5080d33ee --- /dev/null +++ b/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client_config.json @@ -0,0 +1,139 @@ +{ + "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" + } + } + } + } +} diff --git a/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_proto_list.json b/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_proto_list.json new file mode 100644 index 000000000..6a7b737f3 --- /dev/null +++ b/owl-bot-staging/admin/v2/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/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client.ts b/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client.ts new file mode 100644 index 000000000..1776e1ded --- /dev/null +++ b/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client.ts @@ -0,0 +1,4182 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/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; + 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://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [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}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + 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') + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + 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; + + 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)) + }; + + // 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']; + 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(); + return this.innerApiCalls.createTable(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.getTable(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.deleteTable(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.getAuthorizedView(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.deleteAuthorizedView(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.modifyColumnFamilies(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.dropRowRange(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.generateConsistencyToken(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.checkConsistency(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.getSnapshot(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.deleteSnapshot(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.getBackup(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.updateBackup(request, options, callback); + } +/** + * 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(); + return this.innerApiCalls.deleteBackup(request, options, callback); + } +/** + * Gets the access control policy for a Table or Backup 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(); + return this.innerApiCalls.getIamPolicy(request, options, callback); + } +/** + * Sets the access control policy on a Table or Backup 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(); + return this.innerApiCalls.setIamPolicy(request, options, callback); + } +/** + * Returns permissions that the caller has on the specified Table or Backup + * 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(); + return this.innerApiCalls.testIamPermissions(request, options, callback); + } + +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + createTableFromSnapshot( + request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createTableFromSnapshot( + request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createTableFromSnapshot( + request?: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createTableFromSnapshot(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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` + * + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + * @param {object} [options] + * Call options. See {@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.longrunning.IOperation|undefined, {}|undefined + ]>; + updateTable( + request: protos.google.bigtable.admin.v2.IUpdateTableRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateTable( + request: protos.google.bigtable.admin.v2.IUpdateTableRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateTable( + request?: protos.google.bigtable.admin.v2.IUpdateTableRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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(); + return this.innerApiCalls.updateTable(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + undeleteTable( + request: protos.google.bigtable.admin.v2.IUndeleteTableRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + undeleteTable( + request: protos.google.bigtable.admin.v2.IUndeleteTableRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + undeleteTable( + request?: protos.google.bigtable.admin.v2.IUndeleteTableRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.undeleteTable(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + createAuthorizedView( + request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAuthorizedView( + request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAuthorizedView( + request?: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createAuthorizedView(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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//instances//tables/
include: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.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.list_app_profiles.jsinclude:samples/generated/v2/bigtable_instance_admin.list_hot_tablets.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.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.js
/authorizedViews/ + * @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.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAuthorizedView( + request: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAuthorizedView( + request: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAuthorizedView( + request?: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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(); + return this.innerApiCalls.updateAuthorizedView(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + snapshotTable( + request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + snapshotTable( + request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + snapshotTable( + request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.snapshotTable(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackup( + request: protos.google.bigtable.admin.v2.ICreateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackup( + request: protos.google.bigtable.admin.v2.ICreateBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackup( + request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createBackup(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + restoreTable( + request: protos.google.bigtable.admin.v2.IRestoreTableRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restoreTable( + request: protos.google.bigtable.admin.v2.IRestoreTableRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restoreTable( + request?: protos.google.bigtable.admin.v2.IRestoreTableRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.restoreTable(request, options, callback); + } +/** + * 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>{ + 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; + } +/** + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + copyBackup( + request: protos.google.bigtable.admin.v2.ICopyBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + copyBackup( + request: protos.google.bigtable.admin.v2.ICopyBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + copyBackup( + request?: protos.google.bigtable.admin.v2.ICopyBackupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.copyBackup(request, options, callback); + } +/** + * 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>{ + 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; + } + /** + * 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(); + return this.innerApiCalls.listTables(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The 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(); + 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(); + 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 views' 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(); + return this.innerApiCalls.listAuthorizedViews(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The 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 views' 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(); + 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 views' 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(); + 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(); + return this.innerApiCalls.listSnapshots(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The 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(); + 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(); + 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(); + return this.innerApiCalls.listBackups(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The 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(); + 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(); + return this.descriptors.page.listBackups.asyncIterate( + this.innerApiCalls['listBackups'] 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 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 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._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client_config.json b/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client_config.json new file mode 100644 index 000000000..30f1483d8 --- /dev/null +++ b/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client_config.json @@ -0,0 +1,175 @@ +{ + "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": 60000, + "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" + } + } + } + } +} diff --git a/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_proto_list.json b/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_proto_list.json new file mode 100644 index 000000000..6a7b737f3 --- /dev/null +++ b/owl-bot-staging/admin/v2/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/owl-bot-staging/admin/v2/src/v2/gapic_metadata.json b/owl-bot-staging/admin/v2/src/v2/gapic_metadata.json new file mode 100644 index 000000000..083ad58bc --- /dev/null +++ b/owl-bot-staging/admin/v2/src/v2/gapic_metadata.json @@ -0,0 +1,571 @@ +{ + "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", + "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" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles", + "listAppProfilesStream", + "listAppProfilesAsync" + ] + }, + "ListHotTablets": { + "methods": [ + "listHotTablets", + "listHotTabletsStream", + "listHotTabletsAsync" + ] + } + } + }, + "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" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles", + "listAppProfilesStream", + "listAppProfilesAsync" + ] + }, + "ListHotTablets": { + "methods": [ + "listHotTablets", + "listHotTabletsStream", + "listHotTabletsAsync" + ] + } + } + } + } + }, + "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" + ] + }, + "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" + ] + }, + "ListTables": { + "methods": [ + "listTables", + "listTablesStream", + "listTablesAsync" + ] + }, + "ListAuthorizedViews": { + "methods": [ + "listAuthorizedViews", + "listAuthorizedViewsStream", + "listAuthorizedViewsAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + } + } + }, + "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" + ] + }, + "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" + ] + }, + "ListTables": { + "methods": [ + "listTables", + "listTablesStream", + "listTablesAsync" + ] + }, + "ListAuthorizedViews": { + "methods": [ + "listAuthorizedViews", + "listAuthorizedViewsStream", + "listAuthorizedViewsAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/admin/v2/src/v2/index.ts b/owl-bot-staging/admin/v2/src/v2/index.ts new file mode 100644 index 000000000..659217a28 --- /dev/null +++ b/owl-bot-staging/admin/v2/src/v2/index.ts @@ -0,0 +1,20 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.js b/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000..aec0bda4f --- /dev/null +++ b/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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'); + +function main() { + const bigtableInstanceAdminClient = new admin.BigtableInstanceAdminClient(); + const bigtableTableAdminClient = new admin.BigtableTableAdminClient(); +} + +main(); diff --git a/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000..5a621d21b --- /dev/null +++ b/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,38 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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'; + +// 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/owl-bot-staging/admin/v2/system-test/install.ts b/owl-bot-staging/admin/v2/system-test/install.ts new file mode 100644 index 000000000..fd5bfdc71 --- /dev/null +++ b/owl-bot-staging/admin/v2/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/admin/v2/test/gapic_bigtable_instance_admin_v2.ts b/owl-bot-staging/admin/v2/test/gapic_bigtable_instance_admin_v2.ts new file mode 100644 index 000000000..03db09e1d --- /dev/null +++ b/owl-bot-staging/admin/v2/test/gapic_bigtable_instance_admin_v2.ts @@ -0,0 +1,3532 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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(); + assert(client.bigtableInstanceAdminStub); + client.close().then(() => { + done(); + }); + }); + + 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(); + }); + }); + + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + await assert.rejects(client.testIamPermissions(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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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('listAppProfiles', () => { + it('invokes listAppProfiles without error', async () => { + const client = new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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('Path templates', () => { + + describe('appProfile', () => { + 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', + }); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('snapshot', () => { + 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', + }); + 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', () => { + 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', + }); + 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/owl-bot-staging/admin/v2/test/gapic_bigtable_table_admin_v2.ts b/owl-bot-staging/admin/v2/test/gapic_bigtable_table_admin_v2.ts new file mode 100644 index 000000000..f746b07f8 --- /dev/null +++ b/owl-bot-staging/admin/v2/test/gapic_bigtable_table_admin_v2.ts @@ -0,0 +1,4916 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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(); + assert(client.bigtableTableAdminStub); + client.close().then(() => { + done(); + }); + }); + + 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(); + }); + }); + + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + await assert.rejects(client.testIamPermissions(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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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('listTables', () => { + it('invokes listTables without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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('Path templates', () => { + + describe('appProfile', () => { + 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', + }); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('snapshot', () => { + 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', + }); + 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', () => { + 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', + }); + 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/owl-bot-staging/admin/v2/tsconfig.json b/owl-bot-staging/admin/v2/tsconfig.json new file mode 100644 index 000000000..c78f1c884 --- /dev/null +++ b/owl-bot-staging/admin/v2/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/owl-bot-staging/admin/v2/webpack.config.js b/owl-bot-staging/admin/v2/webpack.config.js new file mode 100644 index 000000000..9b488aad8 --- /dev/null +++ b/owl-bot-staging/admin/v2/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: 'bigtable', + filename: './bigtable.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/owl-bot-staging/v2/.eslintignore b/owl-bot-staging/v2/.eslintignore new file mode 100644 index 000000000..cfc348ec4 --- /dev/null +++ b/owl-bot-staging/v2/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/v2/.eslintrc.json b/owl-bot-staging/v2/.eslintrc.json new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/owl-bot-staging/v2/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/v2/.gitignore b/owl-bot-staging/v2/.gitignore new file mode 100644 index 000000000..d4f03a0df --- /dev/null +++ b/owl-bot-staging/v2/.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/owl-bot-staging/v2/.jsdoc.js b/owl-bot-staging/v2/.jsdoc.js new file mode 100644 index 000000000..0b0d11479 --- /dev/null +++ b/owl-bot-staging/v2/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/bigtable', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/v2/.mocharc.js b/owl-bot-staging/v2/.mocharc.js new file mode 100644 index 000000000..13b67c34e --- /dev/null +++ b/owl-bot-staging/v2/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/v2/.prettierrc.js b/owl-bot-staging/v2/.prettierrc.js new file mode 100644 index 000000000..9a8fd6909 --- /dev/null +++ b/owl-bot-staging/v2/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/v2/README.md b/owl-bot-staging/v2/README.md new file mode 100644 index 000000000..c464f1223 --- /dev/null +++ b/owl-bot-staging/v2/README.md @@ -0,0 +1 @@ +Bigtable: Nodejs Client diff --git a/owl-bot-staging/v2/package.json b/owl-bot-staging/v2/package.json new file mode 100644 index 000000000..d7984aef3 --- /dev/null +++ b/owl-bot-staging/v2/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/bigtable", + "version": "0.1.0", + "description": "Bigtable client for Node.js", + "repository": "googleapis/nodejs-bigtable", + "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 bigtable", + "bigtable", + "bigtable" + ], + "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 build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/bigtable.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/bigtable.proto new file mode 100644 index 000000000..7c85b3f75 --- /dev/null +++ b/owl-bot-staging/v2/protos/google/bigtable/v2/bigtable.proto @@ -0,0 +1,1102 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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/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}" +}; + +// 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: "*" + } + }; + 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }; + 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. + 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" + } + }; + 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }; + 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }; + 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }; + 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }; + 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }; + option (google.api.method_signature) = "table_name,row_key,rules"; + option (google.api.method_signature) = + "table_name,row_key,rules,app_profile_id"; + } + + // NOTE: This API is intended to be used by Apache Beam BigtableIO. + // 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`. + 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"; + } + + // NOTE: This API is intended to be used by Apache Beam BigtableIO. + // Reads changes from a table's change stream. Changes will + // reflect both user-initiated mutations and mutations that are caused by + // garbage collection. + 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"; + } + + // Executes a BTQL query against a particular Cloud 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"; + } +} + +// 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/
include: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.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.js
`. + 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" + } + ]; + + // 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, provide enhanced query performance statistics. The semantics + // dictate: + // * request_stats is empty on every (streamed) response, except + // * request_stats has non-empty information after all chunks have been + // streamed, where the ReadRowsResponse message only contains + // request_stats. + // * For example, if a read request would have returned an empty + // response instead a single ReadRowsResponse is streamed with empty + // chunks and request_stats filled. + // + // Visually, response messages will stream as follows: + // ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} + // \______________________/ \________________________________/ + // Primary response Trailer of RequestStats info + // + // Or if the read did not return any values: + // {chunks: [], request_stats: {...}} + // \________________________________/ + // Trailer of RequestStats info + 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" + } + ]; + + // 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.SampleRowKeys. +message SampleRowKeysResponse { + // Sorted streamed sequence of sample row keys in the table. 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. + // 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`. 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]; +} + +// 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]; + } + + // 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. + 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 is 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 is 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. + string query = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Requested data format for the response. + oneof data_format { + // Protocol buffer format as described by ProtoSchema and ProtoRows + // messages. + ProtoFormat proto_format = 4; + } + + // 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. + // + // In case of Value.kind is not set, it will be set to corresponding null + // value in googlesql. + // `params["firstName"] = type {string_type {}}` + // then `@firstName` will be replaced with googlesql null string. + // + // Value.type should always be set and no inference of type will be made from + // Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + // error. + map params = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// 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; + } +} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/data.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/data.proto new file mode 100644 index 000000000..8265611f3 --- /dev/null +++ b/owl-bot-staging/v2/protos/google/bigtable/v2/data.proto @@ -0,0 +1,777 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. + 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; + } +} + +// 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; + } +} + +// 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; +} + +// Batch of serialized ProtoRows. +message ProtoRowsBatch { + // Merge partial results by concatenating these bytes, then parsing the + // overall value as a `ProtoRows` message. + bytes batch_data = 1; +} + +// A partial result set from the streaming query API. +// CBT client will buffer partial_rows from result_sets until it gets a +// resumption_token. +message PartialResultSet { + // Partial Rows in one of the supported formats. It may require many + // PartialResultSets to stream a batch of rows that can decoded on the client. + // The client should buffer partial_rows until it gets a `resume_token`, + // at which point the batch is complete and can be decoded and yielded to the + // user. Each sub-message documents the appropriate way to combine results. + oneof partial_rows { + // Partial rows in serialized ProtoRows format. + ProtoRowsBatch proto_rows_batch = 3; + } + + // An opaque token sent by the server to allow query resumption and signal + // the client to accumulate `partial_rows` since the last non-empty + // `resume_token`. On resumption, the resumed query will return the remaining + // rows for this query. + // + // If there is a batch in progress, a non-empty `resume_token` + // means that that the batch of `partial_rows` will be complete after merging + // the `partial_rows` from this response. The client must only yield + // completed batches to the application, and must ensure that any future + // retries send the latest token to avoid returning duplicate data. + // + // The server may set 'resume_token' without a 'partial_rows'. If there is a + // batch in progress the client should yield it. + // + // 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 + // `partial_rows`, then return OK. + bytes resume_token = 5; + + // Estimated size of a new batch. The server will always set this when + // returning the first `partial_rows` of a batch, and will not set it at any + // other time. + // + // The client can use this estimate to allocate an initial buffer for the + // batched 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; +} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/feature_flags.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/feature_flags.proto new file mode 100644 index 000000000..e97f23e15 --- /dev/null +++ b/owl-bot-staging/v2/protos/google/bigtable/v2/feature_flags.proto @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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; +} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/request_stats.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/request_stats.proto new file mode 100644 index 000000000..c82876876 --- /dev/null +++ b/owl-bot-staging/v2/protos/google/bigtable/v2/request_stats.proto @@ -0,0 +1,113 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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, there are the following supported methods: +// * 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/owl-bot-staging/v2/protos/google/bigtable/v2/response_params.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/response_params.proto new file mode 100644 index 000000000..feb0f7d2a --- /dev/null +++ b/owl-bot-staging/v2/protos/google/bigtable/v2/response_params.proto @@ -0,0 +1,38 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 +// This is an experimental feature that will be used to get zone_id and +// cluster_id from response trailers to tag the metrics. This should not be +// used by customers directly +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; +} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/types.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/types.proto new file mode 100644 index 000000000..71817d44c --- /dev/null +++ b/owl-bot-staging/v2/protos/google/bigtable/v2/types.proto @@ -0,0 +1,294 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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/from the underlying data. +// +// Each encoding also defines the following properties: +// +// * Order-preserving: Does the encoded value sort consistently with the +// original typed value? Note that Bigtable will always sort data based on +// the raw encoded value, *not* the decoded type. +// - Example: BYTES values sort in the same order as their raw encodings. +// - Counterexample: Encoding INT64 as a fixed-width decimal string does +// *not* preserve sort order when dealing with negative numbers. +// `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. +// * Self-delimiting: If we concatenate two encoded values, can we always tell +// where the first one ends and the second one begins? +// - Example: If we encode INT64s to fixed-width STRINGs, the first value +// will always contain exactly N digits, possibly preceded by a sign. +// - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have +// no way to tell where the first one ends. +// * Compatibility: Which other systems have matching encoding schemes? For +// example, does this encoding have a GoogleSQL equivalent? HBase? Java? +message Type { + // Bytes + // Values of type `Bytes` are stored in `Value.bytes_value`. + message Bytes { + // Rules used to convert to/from lower level types. + message Encoding { + // Leaves the value "as-is" + // * Order-preserving? Yes + // * Self-delimiting? No + // * Compatibility? N/A + message Raw {} + + // Which encoding to use. + oneof encoding { + // Use `Raw` encoding. + Raw raw = 1; + } + } + + // The encoding to use when converting to/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/from lower level types. + message Encoding { + // Deprecated: prefer the equivalent `Utf8Bytes`. + message Utf8Raw { + option deprecated = true; + } + + // UTF-8 encoding + // * Order-preserving? Yes (code point order) + // * Self-delimiting? No + // * Compatibility? + // - BigQuery Federation `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/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/from lower level types. + message Encoding { + // Encodes the value as an 8-byte big endian twos complement `Bytes` + // value. + // * Order-preserving? No (positive values only) + // * Self-delimiting? Yes + // * Compatibility? + // - BigQuery Federation `BINARY` encoding + // - HBase `Bytes.toBytes` + // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` + message BigEndianBytes { + // Deprecated: ignored if set. + Bytes bytes_type = 1; + } + + // Which encoding to use. + oneof encoding { + // Use `BigEndianBytes` encoding. + BigEndianBytes big_endian_bytes = 1; + } + } + + // The encoding to use when converting to/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 {} + + // 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; + } + + // The names and types of the fields in this struct. + repeated Field fields = 1; + } + + // 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; + } +} diff --git a/owl-bot-staging/v2/protos/protos.d.ts b/owl-bot-staging/v2/protos/protos.d.ts new file mode 100644 index 000000000..f50c8e27f --- /dev/null +++ b/owl-bot-staging/v2/protos/protos.d.ts @@ -0,0 +1,18201 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 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 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; + } + + 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|executeQuery}. + * @param error Error, if any + * @param [response] ExecuteQueryResponse + */ + type ExecuteQueryCallback = (error: (Error|null), response?: google.bigtable.v2.ExecuteQueryResponse) => void; + } + + /** Properties of a ReadRowsRequest. */ + interface IReadRowsRequest { + + /** ReadRowsRequest tableName */ + tableName?: (string|null); + + /** ReadRowsRequest authorizedViewName */ + authorizedViewName?: (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 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|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|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|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|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|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|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 appProfileId */ + appProfileId?: (string|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 appProfileId. */ + public appProfileId: string; + + /** + * 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|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|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|string|null); + + /** MutateRowRequest mutations */ + mutations?: (google.bigtable.v2.IMutation[]|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|string); + + /** MutateRowRequest mutations. */ + public mutations: google.bigtable.v2.IMutation[]; + + /** + * 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|string|null); + + /** Entry mutations */ + mutations?: (google.bigtable.v2.IMutation[]|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|string); + + /** Entry mutations. */ + public mutations: google.bigtable.v2.IMutation[]; + + /** + * 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); + + /** MutateRowsResponse _rateLimitInfo. */ + public _rateLimitInfo?: "rateLimitInfo"; + + /** + * 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|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|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|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|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|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|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 protoFormat */ + protoFormat?: (google.bigtable.v2.IProtoFormat|null); + + /** ExecuteQueryRequest resumeToken */ + resumeToken?: (Uint8Array|string|null); + + /** ExecuteQueryRequest params */ + params?: ({ [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 protoFormat. */ + public protoFormat?: (google.bigtable.v2.IProtoFormat|null); + + /** ExecuteQueryRequest resumeToken. */ + public resumeToken: (Uint8Array|string); + + /** ExecuteQueryRequest params. */ + public params: { [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 Row. */ + interface IRow { + + /** Row key */ + key?: (Uint8Array|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|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|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|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|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|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|string|null); + + /** Value rawTimestampMicros */ + rawTimestampMicros?: (number|Long|string|null); + + /** Value bytesValue */ + bytesValue?: (Uint8Array|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|string|null); + + /** Value rawTimestampMicros. */ + public rawTimestampMicros?: (number|Long|string|null); + + /** Value bytesValue. */ + public bytesValue?: (Uint8Array|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|string|null); + + /** RowRange startKeyOpen */ + startKeyOpen?: (Uint8Array|string|null); + + /** RowRange endKeyOpen */ + endKeyOpen?: (Uint8Array|string|null); + + /** RowRange endKeyClosed */ + endKeyClosed?: (Uint8Array|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|string|null); + + /** RowRange startKeyOpen. */ + public startKeyOpen?: (Uint8Array|string|null); + + /** RowRange endKeyOpen. */ + public endKeyOpen?: (Uint8Array|string|null); + + /** RowRange endKeyClosed. */ + public endKeyClosed?: (Uint8Array|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|string|null); + + /** ColumnRange startQualifierOpen */ + startQualifierOpen?: (Uint8Array|string|null); + + /** ColumnRange endQualifierClosed */ + endQualifierClosed?: (Uint8Array|string|null); + + /** ColumnRange endQualifierOpen */ + endQualifierOpen?: (Uint8Array|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|string|null); + + /** ColumnRange startQualifierOpen. */ + public startQualifierOpen?: (Uint8Array|string|null); + + /** ColumnRange endQualifierClosed. */ + public endQualifierClosed?: (Uint8Array|string|null); + + /** ColumnRange endQualifierOpen. */ + public endQualifierOpen?: (Uint8Array|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|string|null); + + /** ValueRange startValueOpen */ + startValueOpen?: (Uint8Array|string|null); + + /** ValueRange endValueClosed */ + endValueClosed?: (Uint8Array|string|null); + + /** ValueRange endValueOpen */ + endValueOpen?: (Uint8Array|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|string|null); + + /** ValueRange startValueOpen. */ + public startValueOpen?: (Uint8Array|string|null); + + /** ValueRange endValueClosed. */ + public endValueClosed?: (Uint8Array|string|null); + + /** ValueRange endValueOpen. */ + public endValueOpen?: (Uint8Array|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 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|string|null); + + /** RowFilter rowSampleFilter */ + rowSampleFilter?: (number|null); + + /** RowFilter familyNameRegexFilter */ + familyNameRegexFilter?: (string|null); + + /** RowFilter columnQualifierRegexFilter */ + columnQualifierRegexFilter?: (Uint8Array|string|null); + + /** RowFilter columnRangeFilter */ + columnRangeFilter?: (google.bigtable.v2.IColumnRange|null); + + /** RowFilter timestampRangeFilter */ + timestampRangeFilter?: (google.bigtable.v2.ITimestampRange|null); + + /** RowFilter valueRegexFilter */ + valueRegexFilter?: (Uint8Array|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); + } + + /** 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|string|null); + + /** RowFilter rowSampleFilter. */ + public rowSampleFilter?: (number|null); + + /** RowFilter familyNameRegexFilter. */ + public familyNameRegexFilter?: (string|null); + + /** RowFilter columnQualifierRegexFilter. */ + public columnQualifierRegexFilter?: (Uint8Array|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|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 filter. */ + public filter?: ("chain"|"interleave"|"condition"|"sink"|"passAllFilter"|"blockAllFilter"|"rowKeyRegexFilter"|"rowSampleFilter"|"familyNameRegexFilter"|"columnQualifierRegexFilter"|"columnRangeFilter"|"timestampRangeFilter"|"valueRegexFilter"|"valueRangeFilter"|"cellsPerRowOffsetFilter"|"cellsPerRowLimitFilter"|"cellsPerColumnLimitFilter"|"stripValueTransformer"|"applyLabelTransformer"); + + /** + * 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|string|null); + + /** SetCell timestampMicros */ + timestampMicros?: (number|Long|string|null); + + /** SetCell value */ + value?: (Uint8Array|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|string); + + /** SetCell timestampMicros. */ + public timestampMicros: (number|Long|string); + + /** SetCell value. */ + public value: (Uint8Array|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|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|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|string|null); + + /** ReadModifyWriteRule appendValue */ + appendValue?: (Uint8Array|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|string); + + /** ReadModifyWriteRule appendValue. */ + public appendValue?: (Uint8Array|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|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|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 resumeToken */ + resumeToken?: (Uint8Array|string|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 resumeToken. */ + public resumeToken: (Uint8Array|string); + + /** 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 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); + } + + /** 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 kind. */ + public kind?: ("bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"); + + /** + * 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 { + } + + /** 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); + + /** + * 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 { + } + + /** 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); + + /** + * 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); + } + + /** 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 encoding. */ + public encoding?: "bigEndianBytes"; + + /** + * 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 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 { + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.ITimestamp); + + /** + * 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; + } + + /** 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); + } + + /** 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[]; + + /** + * 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 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; + } + + /** 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); + } + + /** 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; + + /** + * Creates a new FeatureFlags instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureFlags instance + */ + public static create(properties?: google.bigtable.v2.IFeatureFlags): google.bigtable.v2.FeatureFlags; + + /** + * Encodes the specified FeatureFlags message. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. + * @param message FeatureFlags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IFeatureFlags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureFlags message, length delimited. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. + * @param message FeatureFlags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IFeatureFlags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureFlags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.FeatureFlags; + + /** + * Decodes a FeatureFlags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.FeatureFlags; + + /** + * Verifies a FeatureFlags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureFlags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureFlags + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.FeatureFlags; + + /** + * Creates a plain object from a FeatureFlags message. Also converts values to other types if specified. + * @param message FeatureFlags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.FeatureFlags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureFlags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureFlags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseParams. */ + interface IResponseParams { + + /** ResponseParams zoneId */ + zoneId?: (string|null); + + /** ResponseParams clusterId */ + clusterId?: (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 _zoneId. */ + public _zoneId?: "zoneId"; + + /** ResponseParams _clusterId. */ + public _clusterId?: "clusterId"; + + /** + * 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); + } + + /** 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[]; + + /** + * 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); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** 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); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** 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 + } + + /** 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_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 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 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); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** 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); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions 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.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 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 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 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 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 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.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); + } + + /** 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|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a 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); + } + + /** 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); + + /** + * 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 + } + } + + /** 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 features */ + features?: (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 features. */ + public features?: (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 + } + } + } + + /** 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 DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** 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; + } + } +} diff --git a/owl-bot-staging/v2/protos/protos.js b/owl-bot-staging/v2/protos/protos.js new file mode 100644 index 000000000..2b4507225 --- /dev/null +++ b/owl-bot-staging/v2/protos/protos.js @@ -0,0 +1,46519 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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_protos || ($protobuf.roots._google_cloud_bigtable_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.bigtable = (function() { + + /** + * Namespace bigtable. + * @memberof google + * @namespace + */ + var bigtable = {}; + + 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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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|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 this.rpcCall(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 + */ + + 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} [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) + 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 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) + $root.google.bigtable.v2.RowSet.encode(message.rows, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 9: { + message.authorizedViewName = reader.string(); + break; + } + case 5: { + message.appProfileId = reader.string(); + break; + } + case 2: { + message.rows = $root.google.bigtable.v2.RowSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.filter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + var error = $root.google.bigtable.v2.RowSet.verify(message.rows); + if (error) + return "rows." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filter); + if (error) + return "filter." + error; + } + if (message.rowsLimit != null && message.hasOwnProperty("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 && message.hasOwnProperty("requestStatsView")) + switch (message.requestStatsView) { + default: + return "requestStatsView: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.reversed != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ReadRowsRequest) + return object; + 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.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.rows != null) { + if (typeof object.rows !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsRequest.rows: object expected"); + message.rows = $root.google.bigtable.v2.RowSet.fromObject(object.rows); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsRequest.filter: object expected"); + message.filter = $root.google.bigtable.v2.RowFilter.fromObject(object.filter); + } + if (object.rowsLimit != null) + if ($util.Long) + (message.rowsLimit = $util.Long.fromValue(object.rowsLimit)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.rowsLimit = options.longs === String ? "0" : 0; + object.appProfileId = ""; + object.requestStatsView = options.enums === String ? "REQUEST_STATS_VIEW_UNSPECIFIED" : 0; + object.reversed = false; + object.authorizedViewName = ""; + } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.rows != null && message.hasOwnProperty("rows")) + object.rows = $root.google.bigtable.v2.RowSet.toObject(message.rows, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.bigtable.v2.RowFilter.toObject(message.filter, options); + if (message.rowsLimit != null && message.hasOwnProperty("rowsLimit")) + 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 && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.requestStatsView != null && message.hasOwnProperty("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 && message.hasOwnProperty("reversed")) + object.reversed = message.reversed; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 2: { + message.lastScannedRowKey = reader.bytes(); + break; + } + case 3: { + message.requestStats = $root.google.bigtable.v2.RequestStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunks != null && message.hasOwnProperty("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]); + if (error) + return "chunks." + error; + } + } + if (message.lastScannedRowKey != null && message.hasOwnProperty("lastScannedRowKey")) + if (!(message.lastScannedRowKey && typeof message.lastScannedRowKey.length === "number" || $util.isString(message.lastScannedRowKey))) + return "lastScannedRowKey: buffer expected"; + if (message.requestStats != null && message.hasOwnProperty("requestStats")) { + var error = $root.google.bigtable.v2.RequestStats.verify(message.requestStats); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadRowsResponse) + return object; + 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 (typeof object.chunks[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsResponse.chunks: object expected"); + message.chunks[i] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.fromObject(object.chunks[i]); + } + } + 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 (typeof object.requestStats !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsResponse.requestStats: object expected"); + message.requestStats = $root.google.bigtable.v2.RequestStats.fromObject(object.requestStats); + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.lastScannedRowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("requestStats")) + object.requestStats = $root.google.bigtable.v2.RequestStats.toObject(message.requestStats, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.rowKey = reader.bytes(); + break; + } + case 2: { + message.familyName = $root.google.protobuf.StringValue.decode(reader, reader.uint32()); + break; + } + case 3: { + message.qualifier = $root.google.protobuf.BytesValue.decode(reader, reader.uint32()); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) { + var error = $root.google.protobuf.StringValue.verify(message.familyName); + if (error) + return "familyName." + error; + } + if (message.qualifier != null && message.hasOwnProperty("qualifier")) { + var error = $root.google.protobuf.BytesValue.verify(message.qualifier); + if (error) + return "qualifier." + error; + } + if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.valueSize != null && message.hasOwnProperty("valueSize")) + if (!$util.isInteger(message.valueSize)) + return "valueSize: integer expected"; + if (message.resetRow != null && message.hasOwnProperty("resetRow")) { + properties.rowStatus = 1; + if (typeof message.resetRow !== "boolean") + return "resetRow: boolean expected"; + } + if (message.commitRow != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ReadRowsResponse.CellChunk) + return object; + 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 (typeof object.familyName !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.familyName: object expected"); + message.familyName = $root.google.protobuf.StringValue.fromObject(object.familyName); + } + if (object.qualifier != null) { + if (typeof object.qualifier !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier: object expected"); + message.qualifier = $root.google.protobuf.BytesValue.fromObject(object.qualifier); + } + if (object.timestampMicros != null) + if ($util.Long) + (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("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 && message.hasOwnProperty("familyName")) + object.familyName = $root.google.protobuf.StringValue.toObject(message.familyName, options); + if (message.qualifier != null && message.hasOwnProperty("qualifier")) + object.qualifier = $root.google.protobuf.BytesValue.toObject(message.qualifier, options); + if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) + 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 && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.valueSize != null && message.hasOwnProperty("valueSize")) + object.valueSize = message.valueSize; + if (message.resetRow != null && message.hasOwnProperty("resetRow")) { + object.resetRow = message.resetRow; + if (options.oneofs) + object.rowStatus = "resetRow"; + } + if (message.commitRow != null && message.hasOwnProperty("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} [appProfileId] SampleRowKeysRequest appProfileId + */ + + /** + * 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) + 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 appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @instance + */ + SampleRowKeysRequest.prototype.appProfileId = ""; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 4: { + message.authorizedViewName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + 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) { + if (object instanceof $root.google.bigtable.v2.SampleRowKeysRequest) + return object; + 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.appProfileId != null) + message.appProfileId = String(object.appProfileId); + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.authorizedViewName = ""; + } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowKey = reader.bytes(); + break; + } + case 2: { + message.offsetBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.offsetBytes != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.SampleRowKeysResponse) + return object; + 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)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.offsetBytes = options.longs === String ? "0" : 0; + } + if (message.rowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("offsetBytes")) + 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 + */ + + /** + * 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) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); + if (message.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()).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 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.mutations != null && message.hasOwnProperty("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]); + if (error) + return "mutations." + 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) { + if (object instanceof $root.google.bigtable.v2.MutateRowRequest) + return object; + 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 (typeof object.mutations[i] !== "object") + throw TypeError(".google.bigtable.v2.MutateRowRequest.mutations: object expected"); + message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i]); + } + } + 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) { + if (!options) + options = {}; + 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 = ""; + } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.rowKey != null && message.hasOwnProperty("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); + } + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.entries != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.MutateRowsRequest) + return object; + 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 (typeof object.entries[i] !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsRequest.entries: object expected"); + message.entries[i] = $root.google.bigtable.v2.MutateRowsRequest.Entry.fromObject(object.entries[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.authorizedViewName = ""; + } + if (message.tableName != null && message.hasOwnProperty("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); + } + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("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 + */ + + /** + * 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) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.mutations != null && message.hasOwnProperty("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]); + if (error) + return "mutations." + 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) { + if (object instanceof $root.google.bigtable.v2.MutateRowsRequest.Entry) + return object; + 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 (typeof object.mutations[i] !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.mutations: object expected"); + message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.rowKey != null && message.hasOwnProperty("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); + } + 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) + 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; + + /** + * MutateRowsResponse _rateLimitInfo. + * @member {"rateLimitInfo"|undefined} _rateLimitInfo + * @memberof google.bigtable.v2.MutateRowsResponse + * @instance + */ + Object.defineProperty(MutateRowsResponse.prototype, "_rateLimitInfo", { + get: $util.oneOfGetter($oneOfFields = ["rateLimitInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MutateRowsResponse instance using the specified properties. + * @function create + * @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) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.bigtable.v2.MutateRowsResponse.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) + $root.google.bigtable.v2.RateLimitInfo.encode(message.rateLimitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 3: { + message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.bigtable.v2.MutateRowsResponse.Entry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { + properties._rateLimitInfo = 1; + { + var error = $root.google.bigtable.v2.RateLimitInfo.verify(message.rateLimitInfo); + if (error) + return "rateLimitInfo." + error; + } + } + return null; + }; + + /** + * 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) { + if (object instanceof $root.google.bigtable.v2.MutateRowsResponse) + return object; + 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 (typeof object.entries[i] !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsResponse.entries: object expected"); + message.entries[i] = $root.google.bigtable.v2.MutateRowsResponse.Entry.fromObject(object.entries[i]); + } + } + if (object.rateLimitInfo != null) { + if (typeof object.rateLimitInfo !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsResponse.rateLimitInfo: object expected"); + message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.fromObject(object.rateLimitInfo); + } + return message; + }; + + /** + * 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) { + if (!options) + options = {}; + 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); + } + if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { + object.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.toObject(message.rateLimitInfo, options); + if (options.oneofs) + object._rateLimitInfo = "rateLimitInfo"; + } + return object; + }; + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.index = reader.int64(); + break; + } + case 2: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("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 && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + 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) { + if (object instanceof $root.google.bigtable.v2.MutateRowsResponse.Entry) + return object; + var message = new $root.google.bigtable.v2.MutateRowsResponse.Entry(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = 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 (typeof object.status !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsResponse.Entry.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + 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) { + if (!options) + options = {}; + 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() : long; + } else + object.index = options.longs === String ? "0" : 0; + object.status = null; + } + if (message.index != null && message.hasOwnProperty("index")) + 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 && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.factor != null && Object.hasOwnProperty.call(message, "factor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.factor); + return writer; + }; + + /** + * Encodes the specified RateLimitInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {google.bigtable.v2.IRateLimitInfo} message RateLimitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RateLimitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RateLimitInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RateLimitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RateLimitInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.factor = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RateLimitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RateLimitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RateLimitInfo message. + * @function verify + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RateLimitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.period != null && message.hasOwnProperty("period")) { + var error = $root.google.protobuf.Duration.verify(message.period); + if (error) + return "period." + error; + } + if (message.factor != null && message.hasOwnProperty("factor")) + if (typeof message.factor !== "number") + return "factor: number expected"; + return null; + }; + + /** + * Creates a RateLimitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo + */ + RateLimitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.RateLimitInfo) + return object; + var message = new $root.google.bigtable.v2.RateLimitInfo(); + if (object.period != null) { + if (typeof object.period !== "object") + throw TypeError(".google.bigtable.v2.RateLimitInfo.period: object expected"); + message.period = $root.google.protobuf.Duration.fromObject(object.period); + } + if (object.factor != null) + message.factor = Number(object.factor); + return message; + }; + + /** + * Creates a plain object from a RateLimitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {google.bigtable.v2.RateLimitInfo} message RateLimitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RateLimitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.period = null; + object.factor = 0; + } + if (message.period != null && message.hasOwnProperty("period")) + object.period = $root.google.protobuf.Duration.toObject(message.period, options); + if (message.factor != null && message.hasOwnProperty("factor")) + object.factor = options.json && !isFinite(message.factor) ? String(message.factor) : message.factor; + return object; + }; + + /** + * Converts this RateLimitInfo to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RateLimitInfo + * @instance + * @returns {Object.} JSON object + */ + RateLimitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RateLimitInfo + * @function getTypeUrl + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RateLimitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RateLimitInfo"; + }; + + return RateLimitInfo; + })(); + + v2.CheckAndMutateRowRequest = (function() { + + /** + * Properties of a CheckAndMutateRowRequest. + * @memberof google.bigtable.v2 + * @interface ICheckAndMutateRowRequest + * @property {string|null} [tableName] CheckAndMutateRowRequest tableName + * @property {string|null} [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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); + if (message.trueMutations != null && message.trueMutations.length) + for (var i = 0; i < message.trueMutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.trueMutations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.falseMutations != null && message.falseMutations.length) + for (var i = 0; i < message.falseMutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.falseMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) + $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.appProfileId); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + break; + } + case 4: { + if (!(message.trueMutations && message.trueMutations.length)) + message.trueMutations = []; + message.trueMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.falseMutations && message.falseMutations.length)) + message.falseMutations = []; + message.falseMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter); + if (error) + return "predicateFilter." + error; + } + if (message.trueMutations != null && message.hasOwnProperty("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]); + if (error) + return "trueMutations." + error; + } + } + if (message.falseMutations != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowRequest) + return object; + 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 (typeof object.predicateFilter !== "object") + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.predicateFilter: object expected"); + message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter); + } + 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 (typeof object.trueMutations[i] !== "object") + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.trueMutations: object expected"); + message.trueMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.trueMutations[i]); + } + } + 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 (typeof object.falseMutations[i] !== "object") + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.falseMutations: object expected"); + message.falseMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.falseMutations[i]); + } + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.rowKey != null && message.hasOwnProperty("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); + } + 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); + } + if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) + object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.predicateMatched = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.predicateMatched != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowResponse) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.predicateMatched = false; + if (message.predicateMatched != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.PingAndWarmRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.appProfileId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.appProfileId != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.bigtable.v2.ReadModifyWriteRule.verify(message.rules[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowRequest) + return object; + 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 (typeof object.rules[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest.rules: object expected"); + message.rules[i] = $root.google.bigtable.v2.ReadModifyWriteRule.fromObject(object.rules[i]); + } + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.rowKey != null && message.hasOwnProperty("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); + } + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.row = $root.google.bigtable.v2.Row.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.row != null && message.hasOwnProperty("row")) { + var error = $root.google.bigtable.v2.Row.verify(message.row); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowResponse) + return object; + var message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); + if (object.row != null) { + if (typeof object.row !== "object") + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowResponse.row: object expected"); + message.row = $root.google.bigtable.v2.Row.fromObject(object.row); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.row = null; + if (message.row != null && message.hasOwnProperty("row")) + object.row = $root.google.bigtable.v2.Row.toObject(message.row, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); + 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) { + if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) + return object; + var message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partition = null; + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + break; + } + case 4: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.decode(reader, reader.uint32()); + break; + } + case 5: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.heartbeatDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); + if (error) + return "partition." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + properties.startFrom = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + } + if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { + if (properties.startFrom === 1) + return "startFrom: multiple values"; + properties.startFrom = 1; + { + var error = $root.google.bigtable.v2.StreamContinuationTokens.verify(message.continuationTokens); + if (error) + return "continuationTokens." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) { + var error = $root.google.protobuf.Duration.verify(message.heartbeatDuration); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamRequest) + return object; + 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 (typeof object.partition !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.continuationTokens != null) { + if (typeof object.continuationTokens !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.continuationTokens: object expected"); + message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.fromObject(object.continuationTokens); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.heartbeatDuration != null) { + if (typeof object.heartbeatDuration !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.heartbeatDuration: object expected"); + message.heartbeatDuration = $root.google.protobuf.Duration.fromObject(object.heartbeatDuration); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.partition = null; + object.endTime = null; + object.heartbeatDuration = null; + } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) { + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (options.oneofs) + object.startFrom = "startTime"; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { + object.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.toObject(message.continuationTokens, options); + if (options.oneofs) + object.startFrom = "continuationTokens"; + } + if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) + object.heartbeatDuration = $root.google.protobuf.Duration.toObject(message.heartbeatDuration, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.decode(reader, reader.uint32()); + break; + } + case 2: { + message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.decode(reader, reader.uint32()); + break; + } + case 3: { + message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataChange != null && message.hasOwnProperty("dataChange")) { + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify(message.dataChange); + if (error) + return "dataChange." + error; + } + } + if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { + if (properties.streamRecord === 1) + return "streamRecord: multiple values"; + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify(message.heartbeat); + if (error) + return "heartbeat." + error; + } + } + if (message.closeStream != null && message.hasOwnProperty("closeStream")) { + if (properties.streamRecord === 1) + return "streamRecord: multiple values"; + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify(message.closeStream); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse) + return object; + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); + if (object.dataChange != null) { + if (typeof object.dataChange !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.dataChange: object expected"); + message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.fromObject(object.dataChange); + } + if (object.heartbeat != null) { + if (typeof object.heartbeat !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.heartbeat: object expected"); + message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.fromObject(object.heartbeat); + } + if (object.closeStream != null) { + if (typeof object.closeStream !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.closeStream: object expected"); + message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.fromObject(object.closeStream); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.dataChange != null && message.hasOwnProperty("dataChange")) { + object.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.toObject(message.dataChange, options); + if (options.oneofs) + object.streamRecord = "dataChange"; + } + if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { + object.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.toObject(message.heartbeat, options); + if (options.oneofs) + object.streamRecord = "heartbeat"; + } + if (message.closeStream != null && message.hasOwnProperty("closeStream")) { + object.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.toObject(message.closeStream, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mutation = $root.google.bigtable.v2.Mutation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify(message.chunkInfo); + if (error) + return "chunkInfo." + error; + } + if (message.mutation != null && message.hasOwnProperty("mutation")) { + var error = $root.google.bigtable.v2.Mutation.verify(message.mutation); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + return object; + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(); + if (object.chunkInfo != null) { + if (typeof object.chunkInfo !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.chunkInfo: object expected"); + message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.fromObject(object.chunkInfo); + } + if (object.mutation != null) { + if (typeof object.mutation !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.mutation: object expected"); + message.mutation = $root.google.bigtable.v2.Mutation.fromObject(object.mutation); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.chunkInfo = null; + object.mutation = null; + } + if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) + object.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.toObject(message.chunkInfo, options); + if (message.mutation != null && message.hasOwnProperty("mutation")) + object.mutation = $root.google.bigtable.v2.Mutation.toObject(message.mutation, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) + if (!$util.isInteger(message.chunkedValueSize)) + return "chunkedValueSize: integer expected"; + if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) + if (!$util.isInteger(message.chunkedValueOffset)) + return "chunkedValueOffset: integer expected"; + if (message.lastChunk != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.chunkedValueSize = 0; + object.chunkedValueOffset = 0; + object.lastChunk = false; + } + if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) + object.chunkedValueSize = message.chunkedValueSize; + if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) + object.chunkedValueOffset = message.chunkedValueOffset; + if (message.lastChunk != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + 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())); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sourceClusterId != null && message.hasOwnProperty("sourceClusterId")) + if (!$util.isString(message.sourceClusterId)) + return "sourceClusterId: string expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp); + if (error) + return "commitTimestamp." + error; + } + if (message.tiebreaker != null && message.hasOwnProperty("tiebreaker")) + if (!$util.isInteger(message.tiebreaker)) + return "tiebreaker: integer expected"; + if (message.chunks != null && message.hasOwnProperty("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]); + if (error) + return "chunks." + error; + } + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { + var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange) + return object; + 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 (typeof object.commitTimestamp !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.commitTimestamp: object expected"); + message.commitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.commitTimestamp); + } + 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 (typeof object.chunks[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.chunks: object expected"); + message.chunks[i] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.fromObject(object.chunks[i]); + } + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.token != null) + message.token = String(object.token); + if (object.estimatedLowWatermark != null) { + if (typeof object.estimatedLowWatermark !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.estimatedLowWatermark: object expected"); + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark); + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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 && message.hasOwnProperty("sourceClusterId")) + object.sourceClusterId = message.sourceClusterId; + if (message.rowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("commitTimestamp")) + object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options); + if (message.tiebreaker != null && message.hasOwnProperty("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); + } + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) + object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32()); + break; + } + case 2: { + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) { + var error = $root.google.bigtable.v2.StreamContinuationToken.verify(message.continuationToken); + if (error) + return "continuationToken." + error; + } + if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { + var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) + return object; + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(); + if (object.continuationToken != null) { + if (typeof object.continuationToken !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.continuationToken: object expected"); + message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationToken); + } + if (object.estimatedLowWatermark != null) { + if (typeof object.estimatedLowWatermark !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.estimatedLowWatermark: object expected"); + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.continuationToken = null; + object.estimatedLowWatermark = null; + } + if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + object.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationToken, options); + if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) + object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.continuationTokens && message.continuationTokens.length)) + message.continuationTokens = []; + message.continuationTokens.push($root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.newPartitions && message.newPartitions.length)) + message.newPartitions = []; + message.newPartitions.push($root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + if (message.continuationTokens != null && message.hasOwnProperty("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]); + if (error) + return "continuationTokens." + error; + } + } + if (message.newPartitions != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + return object; + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + 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 (typeof object.continuationTokens[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.continuationTokens: object expected"); + message.continuationTokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationTokens[i]); + } + } + 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 (typeof object.newPartitions[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newPartitions: object expected"); + message.newPartitions[i] = $root.google.bigtable.v2.StreamPartition.fromObject(object.newPartitions[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.continuationTokens = []; + object.newPartitions = []; + } + if (options.defaults) + object.status = null; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + 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); + } + 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); + } + 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 {google.bigtable.v2.IProtoFormat|null} [protoFormat] ExecuteQueryRequest protoFormat + * @property {Uint8Array|null} [resumeToken] ExecuteQueryRequest resumeToken + * @property {Object.|null} [params] ExecuteQueryRequest params + */ + + /** + * 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 = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + 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 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; + + // 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).ldelim().ldelim(); + } + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.resumeToken); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + 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()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.params[key] = value; + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.instanceName != null && message.hasOwnProperty("instanceName")) + if (!$util.isString(message.instanceName)) + return "instanceName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { + properties.dataFormat = 1; + { + var error = $root.google.bigtable.v2.ProtoFormat.verify(message.protoFormat); + if (error) + return "protoFormat." + error; + } + } + if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) + return "resumeToken: buffer expected"; + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.params[key[i]]); + if (error) + return "params." + 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) { + if (object instanceof $root.google.bigtable.v2.ExecuteQueryRequest) + return object; + 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.protoFormat != null) { + if (typeof object.protoFormat !== "object") + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.protoFormat: object expected"); + message.protoFormat = $root.google.bigtable.v2.ProtoFormat.fromObject(object.protoFormat); + } + 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 (typeof object.params !== "object") + 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 (typeof object.params[keys[i]] !== "object") + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.params: object expected"); + message.params[keys[i]] = $root.google.bigtable.v2.Value.fromObject(object.params[keys[i]]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.params = {}; + 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 (message.instanceName != null && message.hasOwnProperty("instanceName")) + object.instanceName = message.instanceName; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { + object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options); + 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) + object.params[keys2[j]] = $root.google.bigtable.v2.Value.toObject(message.params[keys2[j]], options); + } + if (message.resumeToken != null && message.hasOwnProperty("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; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ExecuteQueryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metadata = $root.google.bigtable.v2.ResultSetMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.results = $root.google.bigtable.v2.PartialResultSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties.response = 1; + { + var error = $root.google.bigtable.v2.ResultSetMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.results != null && message.hasOwnProperty("results")) { + if (properties.response === 1) + return "response: multiple values"; + properties.response = 1; + { + var error = $root.google.bigtable.v2.PartialResultSet.verify(message.results); + 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) { + if (object instanceof $root.google.bigtable.v2.ExecuteQueryResponse) + return object; + var message = new $root.google.bigtable.v2.ExecuteQueryResponse(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.metadata: object expected"); + message.metadata = $root.google.bigtable.v2.ResultSetMetadata.fromObject(object.metadata); + } + if (object.results != null) { + if (typeof object.results !== "object") + throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.results: object expected"); + message.results = $root.google.bigtable.v2.PartialResultSet.fromObject(object.results); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options); + if (options.oneofs) + object.response = "metadata"; + } + if (message.results != null && message.hasOwnProperty("results")) { + object.results = $root.google.bigtable.v2.PartialResultSet.toObject(message.results, options); + 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.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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.families != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.Row) + return object; + 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 (typeof object.families[i] !== "object") + throw TypeError(".google.bigtable.v2.Row.families: object expected"); + message.families[i] = $root.google.bigtable.v2.Family.fromObject(object.families[i]); + } + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Family(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.bigtable.v2.Column.verify(message.columns[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.Family) + return object; + 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 (typeof object.columns[i] !== "object") + throw TypeError(".google.bigtable.v2.Family.columns: object expected"); + message.columns[i] = $root.google.bigtable.v2.Column.fromObject(object.columns[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Column(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qualifier != null && message.hasOwnProperty("qualifier")) + if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) + return "qualifier: buffer expected"; + if (message.cells != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.Column) + return object; + 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 (typeof object.cells[i] !== "object") + throw TypeError(".google.bigtable.v2.Column.cells: object expected"); + message.cells[i] = $root.google.bigtable.v2.Cell.fromObject(object.cells[i]); + } + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Cell(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) + 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) { + if (object instanceof $root.google.bigtable.v2.Cell) + return object; + var message = new $root.google.bigtable.v2.Cell(); + if (object.timestampMicros != null) + if ($util.Long) + (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("timestampMicros")) + 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 && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + 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()); + break; + } + case 13: { + message.dateValue = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 4: { + message.arrayValue = $root.google.bigtable.v2.ArrayValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type); + if (error) + return "type." + error; + } + if (message.rawValue != null && message.hasOwnProperty("rawValue")) { + properties.kind = 1; + if (!(message.rawValue && typeof message.rawValue.length === "number" || $util.isString(message.rawValue))) + return "rawValue: buffer expected"; + } + if (message.rawTimestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.intValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.floatValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("timestampValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); + if (error) + return "timestampValue." + error; + } + } + if (message.dateValue != null && message.hasOwnProperty("dateValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.type.Date.verify(message.dateValue); + if (error) + return "dateValue." + error; + } + } + if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.ArrayValue.verify(message.arrayValue); + 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) { + if (object instanceof $root.google.bigtable.v2.Value) + return object; + var message = new $root.google.bigtable.v2.Value(); + if (object.type != null) { + if (typeof object.type !== "object") + throw TypeError(".google.bigtable.v2.Value.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type); + } + 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)).unsigned = 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)).unsigned = 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 (typeof object.timestampValue !== "object") + throw TypeError(".google.bigtable.v2.Value.timestampValue: object expected"); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); + } + if (object.dateValue != null) { + if (typeof object.dateValue !== "object") + throw TypeError(".google.bigtable.v2.Value.dateValue: object expected"); + message.dateValue = $root.google.type.Date.fromObject(object.dateValue); + } + if (object.arrayValue != null) { + if (typeof object.arrayValue !== "object") + throw TypeError(".google.bigtable.v2.Value.arrayValue: object expected"); + message.arrayValue = $root.google.bigtable.v2.ArrayValue.fromObject(object.arrayValue); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = null; + if (message.bytesValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + object.arrayValue = $root.google.bigtable.v2.ArrayValue.toObject(message.arrayValue, options); + if (options.oneofs) + object.kind = "arrayValue"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + 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 && message.hasOwnProperty("type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); + if (message.rawValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("rawTimestampMicros")) { + 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 && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; + if (options.oneofs) + object.kind = "floatValue"; + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); + if (options.oneofs) + object.kind = "timestampValue"; + } + if (message.dateValue != null && message.hasOwnProperty("dateValue")) { + object.dateValue = $root.google.type.Date.toObject(message.dateValue, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ArrayValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.values[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.ArrayValue) + return object; + 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 (typeof object.values[i] !== "object") + throw TypeError(".google.bigtable.v2.ArrayValue.values: object expected"); + message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.startKeyClosed != null && message.hasOwnProperty("startKeyClosed")) { + properties.startKey = 1; + if (!(message.startKeyClosed && typeof message.startKeyClosed.length === "number" || $util.isString(message.startKeyClosed))) + return "startKeyClosed: buffer expected"; + } + if (message.startKeyOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endKeyOpen")) { + properties.endKey = 1; + if (!(message.endKeyOpen && typeof message.endKeyOpen.length === "number" || $util.isString(message.endKeyOpen))) + return "endKeyOpen: buffer expected"; + } + if (message.endKeyClosed != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.RowRange) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (message.startKeyClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowKeys != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.RowSet) + return object; + 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 (typeof object.rowRanges[i] !== "object") + throw TypeError(".google.bigtable.v2.RowSet.rowRanges: object expected"); + message.rowRanges[i] = $root.google.bigtable.v2.RowRange.fromObject(object.rowRanges[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.startQualifierClosed != null && message.hasOwnProperty("startQualifierClosed")) { + properties.startQualifier = 1; + if (!(message.startQualifierClosed && typeof message.startQualifierClosed.length === "number" || $util.isString(message.startQualifierClosed))) + return "startQualifierClosed: buffer expected"; + } + if (message.startQualifierOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endQualifierClosed")) { + properties.endQualifier = 1; + if (!(message.endQualifierClosed && typeof message.endQualifierClosed.length === "number" || $util.isString(message.endQualifierClosed))) + return "endQualifierClosed: buffer expected"; + } + if (message.endQualifierOpen != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ColumnRange) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.familyName = ""; + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.startQualifierClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.TimestampRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTimestampMicros = reader.int64(); + break; + } + case 2: { + message.endTimestampMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTimestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.TimestampRange) + return object; + var message = new $root.google.bigtable.v2.TimestampRange(); + if (object.startTimestampMicros != null) + if ($util.Long) + (message.startTimestampMicros = $util.Long.fromValue(object.startTimestampMicros)).unsigned = 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)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.startTimestampMicros = options.longs === String ? "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() : long; + } else + object.endTimestampMicros = options.longs === String ? "0" : 0; + } + if (message.startTimestampMicros != null && message.hasOwnProperty("startTimestampMicros")) + 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 && message.hasOwnProperty("endTimestampMicros")) + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ValueRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.startValueClosed != null && message.hasOwnProperty("startValueClosed")) { + properties.startValue = 1; + if (!(message.startValueClosed && typeof message.startValueClosed.length === "number" || $util.isString(message.startValueClosed))) + return "startValueClosed: buffer expected"; + } + if (message.startValueOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endValueClosed")) { + properties.endValue = 1; + if (!(message.endValueClosed && typeof message.endValueClosed.length === "number" || $util.isString(message.endValueClosed))) + return "endValueClosed: buffer expected"; + } + if (message.endValueOpen != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ValueRange) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (message.startValueClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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.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 + */ + + /** + * 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) + 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; + + // 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"|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"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.chain = $root.google.bigtable.v2.RowFilter.Chain.decode(reader, reader.uint32()); + break; + } + case 2: { + message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.decode(reader, reader.uint32()); + break; + } + case 3: { + message.condition = $root.google.bigtable.v2.RowFilter.Condition.decode(reader, reader.uint32()); + 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()); + break; + } + case 8: { + message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.decode(reader, reader.uint32()); + break; + } + case 9: { + message.valueRegexFilter = reader.bytes(); + break; + } + case 15: { + message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.decode(reader, reader.uint32()); + 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; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.chain != null && message.hasOwnProperty("chain")) { + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Chain.verify(message.chain); + if (error) + return "chain." + error; + } + } + if (message.interleave != null && message.hasOwnProperty("interleave")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Interleave.verify(message.interleave); + if (error) + return "interleave." + error; + } + } + if (message.condition != null && message.hasOwnProperty("condition")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Condition.verify(message.condition); + if (error) + return "condition." + error; + } + } + if (message.sink != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("columnRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.ColumnRange.verify(message.columnRangeFilter); + if (error) + return "columnRangeFilter." + error; + } + } + if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.TimestampRange.verify(message.timestampRangeFilter); + if (error) + return "timestampRangeFilter." + error; + } + } + if (message.valueRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("valueRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.ValueRange.verify(message.valueRangeFilter); + if (error) + return "valueRangeFilter." + error; + } + } + if (message.cellsPerRowOffsetFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("applyLabelTransformer")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.applyLabelTransformer)) + return "applyLabelTransformer: string expected"; + } + 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) { + if (object instanceof $root.google.bigtable.v2.RowFilter) + return object; + var message = new $root.google.bigtable.v2.RowFilter(); + if (object.chain != null) { + if (typeof object.chain !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.chain: object expected"); + message.chain = $root.google.bigtable.v2.RowFilter.Chain.fromObject(object.chain); + } + if (object.interleave != null) { + if (typeof object.interleave !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.interleave: object expected"); + message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.fromObject(object.interleave); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.condition: object expected"); + message.condition = $root.google.bigtable.v2.RowFilter.Condition.fromObject(object.condition); + } + 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 (typeof object.columnRangeFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.columnRangeFilter: object expected"); + message.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.fromObject(object.columnRangeFilter); + } + if (object.timestampRangeFilter != null) { + if (typeof object.timestampRangeFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.timestampRangeFilter: object expected"); + message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.fromObject(object.timestampRangeFilter); + } + 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 (typeof object.valueRangeFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.valueRangeFilter: object expected"); + message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.fromObject(object.valueRangeFilter); + } + 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); + 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) { + if (!options) + options = {}; + var object = {}; + if (message.chain != null && message.hasOwnProperty("chain")) { + object.chain = $root.google.bigtable.v2.RowFilter.Chain.toObject(message.chain, options); + if (options.oneofs) + object.filter = "chain"; + } + if (message.interleave != null && message.hasOwnProperty("interleave")) { + object.interleave = $root.google.bigtable.v2.RowFilter.Interleave.toObject(message.interleave, options); + if (options.oneofs) + object.filter = "interleave"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + object.condition = $root.google.bigtable.v2.RowFilter.Condition.toObject(message.condition, options); + if (options.oneofs) + object.filter = "condition"; + } + if (message.rowKeyRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("familyNameRegexFilter")) { + object.familyNameRegexFilter = message.familyNameRegexFilter; + if (options.oneofs) + object.filter = "familyNameRegexFilter"; + } + if (message.columnQualifierRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("columnRangeFilter")) { + object.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.toObject(message.columnRangeFilter, options); + if (options.oneofs) + object.filter = "columnRangeFilter"; + } + if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { + object.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.toObject(message.timestampRangeFilter, options); + if (options.oneofs) + object.filter = "timestampRangeFilter"; + } + if (message.valueRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("cellsPerRowOffsetFilter")) { + object.cellsPerRowOffsetFilter = message.cellsPerRowOffsetFilter; + if (options.oneofs) + object.filter = "cellsPerRowOffsetFilter"; + } + if (message.cellsPerRowLimitFilter != null && message.hasOwnProperty("cellsPerRowLimitFilter")) { + object.cellsPerRowLimitFilter = message.cellsPerRowLimitFilter; + if (options.oneofs) + object.filter = "cellsPerRowLimitFilter"; + } + if (message.cellsPerColumnLimitFilter != null && message.hasOwnProperty("cellsPerColumnLimitFilter")) { + object.cellsPerColumnLimitFilter = message.cellsPerColumnLimitFilter; + if (options.oneofs) + object.filter = "cellsPerColumnLimitFilter"; + } + if (message.stripValueTransformer != null && message.hasOwnProperty("stripValueTransformer")) { + object.stripValueTransformer = message.stripValueTransformer; + if (options.oneofs) + object.filter = "stripValueTransformer"; + } + if (message.rowSampleFilter != null && message.hasOwnProperty("rowSampleFilter")) { + object.rowSampleFilter = options.json && !isFinite(message.rowSampleFilter) ? String(message.rowSampleFilter) : message.rowSampleFilter; + if (options.oneofs) + object.filter = "rowSampleFilter"; + } + if (message.valueRangeFilter != null && message.hasOwnProperty("valueRangeFilter")) { + object.valueRangeFilter = $root.google.bigtable.v2.ValueRange.toObject(message.valueRangeFilter, options); + if (options.oneofs) + object.filter = "valueRangeFilter"; + } + if (message.sink != null && message.hasOwnProperty("sink")) { + object.sink = message.sink; + if (options.oneofs) + object.filter = "sink"; + } + if (message.passAllFilter != null && message.hasOwnProperty("passAllFilter")) { + object.passAllFilter = message.passAllFilter; + if (options.oneofs) + object.filter = "passAllFilter"; + } + if (message.blockAllFilter != null && message.hasOwnProperty("blockAllFilter")) { + object.blockAllFilter = message.blockAllFilter; + if (options.oneofs) + object.filter = "blockAllFilter"; + } + if (message.applyLabelTransformer != null && message.hasOwnProperty("applyLabelTransformer")) { + object.applyLabelTransformer = message.applyLabelTransformer; + if (options.oneofs) + object.filter = "applyLabelTransformer"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Chain) + return object; + 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 (typeof object.filters[i] !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Chain.filters: object expected"); + message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Interleave) + return object; + 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 (typeof object.filters[i] !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Interleave.filters: object expected"); + message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.predicateFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); + break; + } + case 2: { + message.trueFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.falseFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter); + if (error) + return "predicateFilter." + error; + } + if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.trueFilter); + if (error) + return "trueFilter." + error; + } + if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.falseFilter); + 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) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Condition) + return object; + var message = new $root.google.bigtable.v2.RowFilter.Condition(); + if (object.predicateFilter != null) { + if (typeof object.predicateFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Condition.predicateFilter: object expected"); + message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter); + } + if (object.trueFilter != null) { + if (typeof object.trueFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Condition.trueFilter: object expected"); + message.trueFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.trueFilter); + } + if (object.falseFilter != null) { + if (typeof object.falseFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Condition.falseFilter: object expected"); + message.falseFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.falseFilter); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.predicateFilter = null; + object.trueFilter = null; + object.falseFilter = null; + } + if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) + object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); + if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) + object.trueFilter = $root.google.bigtable.v2.RowFilter.toObject(message.trueFilter, options); + if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) + object.falseFilter = $root.google.bigtable.v2.RowFilter.toObject(message.falseFilter, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.setCell = $root.google.bigtable.v2.Mutation.SetCell.decode(reader, reader.uint32()); + break; + } + case 5: { + message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.decode(reader, reader.uint32()); + break; + } + case 6: { + message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.decode(reader, reader.uint32()); + break; + } + case 2: { + message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.decode(reader, reader.uint32()); + break; + } + case 3: { + message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.setCell != null && message.hasOwnProperty("setCell")) { + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.SetCell.verify(message.setCell); + if (error) + return "setCell." + error; + } + } + if (message.addToCell != null && message.hasOwnProperty("addToCell")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.AddToCell.verify(message.addToCell); + if (error) + return "addToCell." + error; + } + } + if (message.mergeToCell != null && message.hasOwnProperty("mergeToCell")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.MergeToCell.verify(message.mergeToCell); + if (error) + return "mergeToCell." + error; + } + } + if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromColumn.verify(message.deleteFromColumn); + if (error) + return "deleteFromColumn." + error; + } + } + if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromFamily.verify(message.deleteFromFamily); + if (error) + return "deleteFromFamily." + error; + } + } + if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromRow.verify(message.deleteFromRow); + 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) { + if (object instanceof $root.google.bigtable.v2.Mutation) + return object; + var message = new $root.google.bigtable.v2.Mutation(); + if (object.setCell != null) { + if (typeof object.setCell !== "object") + throw TypeError(".google.bigtable.v2.Mutation.setCell: object expected"); + message.setCell = $root.google.bigtable.v2.Mutation.SetCell.fromObject(object.setCell); + } + if (object.addToCell != null) { + if (typeof object.addToCell !== "object") + throw TypeError(".google.bigtable.v2.Mutation.addToCell: object expected"); + message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.fromObject(object.addToCell); + } + if (object.mergeToCell != null) { + if (typeof object.mergeToCell !== "object") + throw TypeError(".google.bigtable.v2.Mutation.mergeToCell: object expected"); + message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.fromObject(object.mergeToCell); + } + if (object.deleteFromColumn != null) { + if (typeof object.deleteFromColumn !== "object") + throw TypeError(".google.bigtable.v2.Mutation.deleteFromColumn: object expected"); + message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.fromObject(object.deleteFromColumn); + } + if (object.deleteFromFamily != null) { + if (typeof object.deleteFromFamily !== "object") + throw TypeError(".google.bigtable.v2.Mutation.deleteFromFamily: object expected"); + message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.fromObject(object.deleteFromFamily); + } + if (object.deleteFromRow != null) { + if (typeof object.deleteFromRow !== "object") + throw TypeError(".google.bigtable.v2.Mutation.deleteFromRow: object expected"); + message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.fromObject(object.deleteFromRow); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.setCell != null && message.hasOwnProperty("setCell")) { + object.setCell = $root.google.bigtable.v2.Mutation.SetCell.toObject(message.setCell, options); + if (options.oneofs) + object.mutation = "setCell"; + } + if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { + object.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.toObject(message.deleteFromColumn, options); + if (options.oneofs) + object.mutation = "deleteFromColumn"; + } + if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { + object.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.toObject(message.deleteFromFamily, options); + if (options.oneofs) + object.mutation = "deleteFromFamily"; + } + if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { + object.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.toObject(message.deleteFromRow, options); + if (options.oneofs) + object.mutation = "deleteFromRow"; + } + if (message.addToCell != null && message.hasOwnProperty("addToCell")) { + object.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.toObject(message.addToCell, options); + if (options.oneofs) + object.mutation = "addToCell"; + } + if (message.mergeToCell != null && message.hasOwnProperty("mergeToCell")) { + object.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.toObject(message.mergeToCell, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.Mutation.SetCell) + return object; + 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)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("timestampMicros")) + 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 && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 3: { + message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { + var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier); + if (error) + return "columnQualifier." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.bigtable.v2.Value.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.bigtable.v2.Value.verify(message.input); + 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) { + if (object instanceof $root.google.bigtable.v2.Mutation.AddToCell) + return object; + var message = new $root.google.bigtable.v2.Mutation.AddToCell(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) { + if (typeof object.columnQualifier !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.columnQualifier: object expected"); + message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.timestamp: object expected"); + message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp); + } + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.input: object expected"); + message.input = $root.google.bigtable.v2.Value.fromObject(object.input); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.familyName = ""; + object.columnQualifier = null; + object.timestamp = null; + object.input = null; + } + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 3: { + message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { + var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier); + if (error) + return "columnQualifier." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.bigtable.v2.Value.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.bigtable.v2.Value.verify(message.input); + 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) { + if (object instanceof $root.google.bigtable.v2.Mutation.MergeToCell) + return object; + var message = new $root.google.bigtable.v2.Mutation.MergeToCell(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) { + if (typeof object.columnQualifier !== "object") + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.columnQualifier: object expected"); + message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.timestamp: object expected"); + message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp); + } + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.input: object expected"); + message.input = $root.google.bigtable.v2.Value.fromObject(object.input); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.familyName = ""; + object.columnQualifier = null; + object.timestamp = null; + object.input = null; + } + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.timeRange != null && message.hasOwnProperty("timeRange")) { + var error = $root.google.bigtable.v2.TimestampRange.verify(message.timeRange); + 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) { + if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromColumn) + return object; + 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 (typeof object.timeRange !== "object") + throw TypeError(".google.bigtable.v2.Mutation.DeleteFromColumn.timeRange: object expected"); + message.timeRange = $root.google.bigtable.v2.TimestampRange.fromObject(object.timeRange); + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("timeRange")) + object.timeRange = $root.google.bigtable.v2.TimestampRange.toObject(message.timeRange, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromFamily) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.familyName = ""; + if (message.familyName != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.appendValue != null && message.hasOwnProperty("appendValue")) { + properties.rule = 1; + if (!(message.appendValue && typeof message.appendValue.length === "number" || $util.isString(message.appendValue))) + return "appendValue: buffer expected"; + } + if (message.incrementAmount != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRule) + return object; + 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)).unsigned = 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("incrementAmount")) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamPartition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowRange = $root.google.bigtable.v2.RowRange.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowRange != null && message.hasOwnProperty("rowRange")) { + var error = $root.google.bigtable.v2.RowRange.verify(message.rowRange); + 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) { + if (object instanceof $root.google.bigtable.v2.StreamPartition) + return object; + var message = new $root.google.bigtable.v2.StreamPartition(); + if (object.rowRange != null) { + if (typeof object.rowRange !== "object") + throw TypeError(".google.bigtable.v2.StreamPartition.rowRange: object expected"); + message.rowRange = $root.google.bigtable.v2.RowRange.fromObject(object.rowRange); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.rowRange = null; + if (message.rowRange != null && message.hasOwnProperty("rowRange")) + object.rowRange = $root.google.bigtable.v2.RowRange.toObject(message.rowRange, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationTokens(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokens != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.StreamContinuationTokens) + return object; + 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 (typeof object.tokens[i] !== "object") + throw TypeError(".google.bigtable.v2.StreamContinuationTokens.tokens: object expected"); + message.tokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.tokens[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationToken(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); + break; + } + case 2: { + message.token = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); + if (error) + return "partition." + error; + } + if (message.token != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.StreamContinuationToken) + return object; + var message = new $root.google.bigtable.v2.StreamContinuationToken(); + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.bigtable.v2.StreamContinuationToken.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.partition = null; + object.token = ""; + } + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); + if (message.token != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type); + 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) { + if (object instanceof $root.google.bigtable.v2.ColumnMetadata) + return object; + var message = new $root.google.bigtable.v2.ColumnMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) { + if (typeof object.type !== "object") + throw TypeError(".google.bigtable.v2.ColumnMetadata.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.bigtable.v2.ColumnMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.bigtable.v2.ColumnMetadata.verify(message.columns[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.ProtoSchema) + return object; + 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 (typeof object.columns[i] !== "object") + throw TypeError(".google.bigtable.v2.ProtoSchema.columns: object expected"); + message.columns[i] = $root.google.bigtable.v2.ColumnMetadata.fromObject(object.columns[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ResultSetMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.protoSchema = $root.google.bigtable.v2.ProtoSchema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { + properties.schema = 1; + { + var error = $root.google.bigtable.v2.ProtoSchema.verify(message.protoSchema); + 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) { + if (object instanceof $root.google.bigtable.v2.ResultSetMetadata) + return object; + var message = new $root.google.bigtable.v2.ResultSetMetadata(); + if (object.protoSchema != null) { + if (typeof object.protoSchema !== "object") + throw TypeError(".google.bigtable.v2.ResultSetMetadata.protoSchema: object expected"); + message.protoSchema = $root.google.bigtable.v2.ProtoSchema.fromObject(object.protoSchema); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { + object.protoSchema = $root.google.bigtable.v2.ProtoSchema.toObject(message.protoSchema, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoRows(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.values[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.ProtoRows) + return object; + 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 (typeof object.values[i] !== "object") + throw TypeError(".google.bigtable.v2.ProtoRows.values: object expected"); + message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoRowsBatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.batchData = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.batchData != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ProtoRowsBatch) + return object; + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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 {Uint8Array|null} [resumeToken] PartialResultSet resumeToken + * @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) + 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 resumeToken. + * @member {Uint8Array} resumeToken + * @memberof google.bigtable.v2.PartialResultSet + * @instance + */ + PartialResultSet.prototype.resumeToken = $util.newBuffer([]); + + /** + * 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) + }); + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PartialResultSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.decode(reader, reader.uint32()); + break; + } + case 5: { + message.resumeToken = reader.bytes(); + break; + } + case 4: { + message.estimatedBatchSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.protoRowsBatch != null && message.hasOwnProperty("protoRowsBatch")) { + properties.partialRows = 1; + { + var error = $root.google.bigtable.v2.ProtoRowsBatch.verify(message.protoRowsBatch); + if (error) + return "protoRowsBatch." + error; + } + } + if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) + return "resumeToken: buffer expected"; + if (message.estimatedBatchSize != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.PartialResultSet) + return object; + var message = new $root.google.bigtable.v2.PartialResultSet(); + if (object.protoRowsBatch != null) { + if (typeof object.protoRowsBatch !== "object") + throw TypeError(".google.bigtable.v2.PartialResultSet.protoRowsBatch: object expected"); + message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.fromObject(object.protoRowsBatch); + } + 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.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) { + if (!options) + options = {}; + 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); + } + } + if (message.protoRowsBatch != null && message.hasOwnProperty("protoRowsBatch")) { + object.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.toObject(message.protoRowsBatch, options); + if (options.oneofs) + object.partialRows = "protoRowsBatch"; + } + if (message.estimatedBatchSize != null && message.hasOwnProperty("estimatedBatchSize")) + object.estimatedBatchSize = message.estimatedBatchSize; + if (message.resumeToken != null && message.hasOwnProperty("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; + 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.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 + */ + + /** + * 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) + 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; + + // 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"|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"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.v2.Type.Bytes.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stringType = $root.google.bigtable.v2.Type.String.decode(reader, reader.uint32()); + break; + } + case 5: { + message.int64Type = $root.google.bigtable.v2.Type.Int64.decode(reader, reader.uint32()); + break; + } + case 12: { + message.float32Type = $root.google.bigtable.v2.Type.Float32.decode(reader, reader.uint32()); + break; + } + case 9: { + message.float64Type = $root.google.bigtable.v2.Type.Float64.decode(reader, reader.uint32()); + break; + } + case 8: { + message.boolType = $root.google.bigtable.v2.Type.Bool.decode(reader, reader.uint32()); + break; + } + case 10: { + message.timestampType = $root.google.bigtable.v2.Type.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.dateType = $root.google.bigtable.v2.Type.Date.decode(reader, reader.uint32()); + break; + } + case 6: { + message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.decode(reader, reader.uint32()); + break; + } + case 7: { + message.structType = $root.google.bigtable.v2.Type.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.arrayType = $root.google.bigtable.v2.Type.Array.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mapType = $root.google.bigtable.v2.Type.Map.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType); + if (error) + return "bytesType." + error; + } + } + if (message.stringType != null && message.hasOwnProperty("stringType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.String.verify(message.stringType); + if (error) + return "stringType." + error; + } + } + if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Int64.verify(message.int64Type); + if (error) + return "int64Type." + error; + } + } + if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Float32.verify(message.float32Type); + if (error) + return "float32Type." + error; + } + } + if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Float64.verify(message.float64Type); + if (error) + return "float64Type." + error; + } + } + if (message.boolType != null && message.hasOwnProperty("boolType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Bool.verify(message.boolType); + if (error) + return "boolType." + error; + } + } + if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Timestamp.verify(message.timestampType); + if (error) + return "timestampType." + error; + } + } + if (message.dateType != null && message.hasOwnProperty("dateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Date.verify(message.dateType); + if (error) + return "dateType." + error; + } + } + if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.verify(message.aggregateType); + if (error) + return "aggregateType." + error; + } + } + if (message.structType != null && message.hasOwnProperty("structType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Struct.verify(message.structType); + if (error) + return "structType." + error; + } + } + if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Array.verify(message.arrayType); + if (error) + return "arrayType." + error; + } + } + if (message.mapType != null && message.hasOwnProperty("mapType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Map.verify(message.mapType); + if (error) + return "mapType." + 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) { + if (object instanceof $root.google.bigtable.v2.Type) + return object; + var message = new $root.google.bigtable.v2.Type(); + if (object.bytesType != null) { + if (typeof object.bytesType !== "object") + throw TypeError(".google.bigtable.v2.Type.bytesType: object expected"); + message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType); + } + if (object.stringType != null) { + if (typeof object.stringType !== "object") + throw TypeError(".google.bigtable.v2.Type.stringType: object expected"); + message.stringType = $root.google.bigtable.v2.Type.String.fromObject(object.stringType); + } + if (object.int64Type != null) { + if (typeof object.int64Type !== "object") + throw TypeError(".google.bigtable.v2.Type.int64Type: object expected"); + message.int64Type = $root.google.bigtable.v2.Type.Int64.fromObject(object.int64Type); + } + if (object.float32Type != null) { + if (typeof object.float32Type !== "object") + throw TypeError(".google.bigtable.v2.Type.float32Type: object expected"); + message.float32Type = $root.google.bigtable.v2.Type.Float32.fromObject(object.float32Type); + } + if (object.float64Type != null) { + if (typeof object.float64Type !== "object") + throw TypeError(".google.bigtable.v2.Type.float64Type: object expected"); + message.float64Type = $root.google.bigtable.v2.Type.Float64.fromObject(object.float64Type); + } + if (object.boolType != null) { + if (typeof object.boolType !== "object") + throw TypeError(".google.bigtable.v2.Type.boolType: object expected"); + message.boolType = $root.google.bigtable.v2.Type.Bool.fromObject(object.boolType); + } + if (object.timestampType != null) { + if (typeof object.timestampType !== "object") + throw TypeError(".google.bigtable.v2.Type.timestampType: object expected"); + message.timestampType = $root.google.bigtable.v2.Type.Timestamp.fromObject(object.timestampType); + } + if (object.dateType != null) { + if (typeof object.dateType !== "object") + throw TypeError(".google.bigtable.v2.Type.dateType: object expected"); + message.dateType = $root.google.bigtable.v2.Type.Date.fromObject(object.dateType); + } + if (object.aggregateType != null) { + if (typeof object.aggregateType !== "object") + throw TypeError(".google.bigtable.v2.Type.aggregateType: object expected"); + message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.fromObject(object.aggregateType); + } + if (object.structType != null) { + if (typeof object.structType !== "object") + throw TypeError(".google.bigtable.v2.Type.structType: object expected"); + message.structType = $root.google.bigtable.v2.Type.Struct.fromObject(object.structType); + } + if (object.arrayType != null) { + if (typeof object.arrayType !== "object") + throw TypeError(".google.bigtable.v2.Type.arrayType: object expected"); + message.arrayType = $root.google.bigtable.v2.Type.Array.fromObject(object.arrayType); + } + if (object.mapType != null) { + if (typeof object.mapType !== "object") + throw TypeError(".google.bigtable.v2.Type.mapType: object expected"); + message.mapType = $root.google.bigtable.v2.Type.Map.fromObject(object.mapType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options); + if (options.oneofs) + object.kind = "bytesType"; + } + if (message.stringType != null && message.hasOwnProperty("stringType")) { + object.stringType = $root.google.bigtable.v2.Type.String.toObject(message.stringType, options); + if (options.oneofs) + object.kind = "stringType"; + } + if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + object.arrayType = $root.google.bigtable.v2.Type.Array.toObject(message.arrayType, options); + if (options.oneofs) + object.kind = "arrayType"; + } + if (message.mapType != null && message.hasOwnProperty("mapType")) { + object.mapType = $root.google.bigtable.v2.Type.Map.toObject(message.mapType, options); + if (options.oneofs) + object.kind = "mapType"; + } + if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + object.int64Type = $root.google.bigtable.v2.Type.Int64.toObject(message.int64Type, options); + if (options.oneofs) + object.kind = "int64Type"; + } + if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + object.aggregateType = $root.google.bigtable.v2.Type.Aggregate.toObject(message.aggregateType, options); + if (options.oneofs) + object.kind = "aggregateType"; + } + if (message.structType != null && message.hasOwnProperty("structType")) { + object.structType = $root.google.bigtable.v2.Type.Struct.toObject(message.structType, options); + if (options.oneofs) + object.kind = "structType"; + } + if (message.boolType != null && message.hasOwnProperty("boolType")) { + object.boolType = $root.google.bigtable.v2.Type.Bool.toObject(message.boolType, options); + if (options.oneofs) + object.kind = "boolType"; + } + if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + object.float64Type = $root.google.bigtable.v2.Type.Float64.toObject(message.float64Type, options); + if (options.oneofs) + object.kind = "float64Type"; + } + if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + object.timestampType = $root.google.bigtable.v2.Type.Timestamp.toObject(message.timestampType, options); + if (options.oneofs) + object.kind = "timestampType"; + } + if (message.dateType != null && message.hasOwnProperty("dateType")) { + object.dateType = $root.google.bigtable.v2.Type.Date.toObject(message.dateType, options); + if (options.oneofs) + object.kind = "dateType"; + } + if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + object.float32Type = $root.google.bigtable.v2.Type.Float32.toObject(message.float32Type, options); + if (options.oneofs) + object.kind = "float32Type"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.v2.Type.Bytes.Encoding.verify(message.encoding); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes) + return object; + var message = new $root.google.bigtable.v2.Type.Bytes(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.v2.Type.Bytes.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.fromObject(object.encoding); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.toObject(message.encoding, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.raw != null && message.hasOwnProperty("raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.verify(message.raw); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding) + return object; + var message = new $root.google.bigtable.v2.Type.Bytes.Encoding(); + if (object.raw != null) { + if (typeof object.raw !== "object") + throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding.raw: object expected"); + message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.fromObject(object.raw); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.raw != null && message.hasOwnProperty("raw")) { + object.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options); + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object 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) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding.Raw) + return object; + return new $root.google.bigtable.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.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() { + return {}; + }; + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.String.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.v2.Type.String.Encoding.verify(message.encoding); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.String) + return object; + var message = new $root.google.bigtable.v2.Type.String(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.v2.Type.String.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.String.Encoding.fromObject(object.encoding); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.v2.Type.String.Encoding.toObject(message.encoding, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.decode(reader, reader.uint32()); + break; + } + case 2: { + message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw); + if (error) + return "utf8Raw." + error; + } + } + if (message.utf8Bytes != null && message.hasOwnProperty("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); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.String.Encoding) + return object; + var message = new $root.google.bigtable.v2.Type.String.Encoding(); + if (object.utf8Raw != null) { + if (typeof object.utf8Raw !== "object") + throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Raw: object expected"); + message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.fromObject(object.utf8Raw); + } + if (object.utf8Bytes != null) { + if (typeof object.utf8Bytes !== "object") + throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Bytes: object expected"); + message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.fromObject(object.utf8Bytes); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { + object.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options); + if (options.oneofs) + object.encoding = "utf8Raw"; + } + if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { + object.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object 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) { + if (object instanceof $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) + return object; + return new $root.google.bigtable.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.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() { + return {}; + }; + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.v2.Type.Int64.Encoding.verify(message.encoding); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Int64) + return object; + var message = new $root.google.bigtable.v2.Type.Int64(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.v2.Type.Int64.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.fromObject(object.encoding); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.encoding, options); + 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 + */ + + /** + * 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) + 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; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"bigEndianBytes"|undefined} encoding + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["bigEndianBytes"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes); + if (error) + return "bigEndianBytes." + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding) + return object; + var message = new $root.google.bigtable.v2.Type.Int64.Encoding(); + if (object.bigEndianBytes != null) { + if (typeof object.bigEndianBytes !== "object") + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.bigEndianBytes: object expected"); + message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.fromObject(object.bigEndianBytes); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + object.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options); + if (options.oneofs) + object.encoding = "bigEndianBytes"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.v2.Type.Bytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) + return object; + var message = new $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes(); + if (object.bytesType != null) { + if (typeof object.bytesType !== "object") + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytesType: object expected"); + message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bytesType = null; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) + object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options); + 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; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Timestamp) + return object; + return new $root.google.bigtable.v2.Type.Timestamp(); + }; + + /** + * 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() { + return {}; + }; + + /** + * 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"; + }; + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Array.} fields + * @memberof google.bigtable.v2.Type.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyArray; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.bigtable.v2.Type.Struct.Field.verify(message.fields[i]); + if (error) + return "fields." + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Struct) + return object; + 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 (typeof object.fields[i] !== "object") + throw TypeError(".google.bigtable.v2.Type.Struct.fields: object expected"); + message.fields[i] = $root.google.bigtable.v2.Type.Struct.Field.fromObject(object.fields[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Struct.Field) + return object; + var message = new $root.google.bigtable.v2.Type.Struct.Field(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.type != null) { + if (typeof object.type !== "object") + throw TypeError(".google.bigtable.v2.Type.Struct.Field.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.type = null; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); + 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; + })(); + + return Struct; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.elementType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.elementType != null && message.hasOwnProperty("elementType")) { + var error = $root.google.bigtable.v2.Type.verify(message.elementType); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Array) + return object; + var message = new $root.google.bigtable.v2.Type.Array(); + if (object.elementType != null) { + if (typeof object.elementType !== "object") + throw TypeError(".google.bigtable.v2.Type.Array.elementType: object expected"); + message.elementType = $root.google.bigtable.v2.Type.fromObject(object.elementType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.elementType = null; + if (message.elementType != null && message.hasOwnProperty("elementType")) + object.elementType = $root.google.bigtable.v2.Type.toObject(message.elementType, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.keyType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.valueType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyType != null && message.hasOwnProperty("keyType")) { + var error = $root.google.bigtable.v2.Type.verify(message.keyType); + if (error) + return "keyType." + error; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) { + var error = $root.google.bigtable.v2.Type.verify(message.valueType); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Map) + return object; + var message = new $root.google.bigtable.v2.Type.Map(); + if (object.keyType != null) { + if (typeof object.keyType !== "object") + throw TypeError(".google.bigtable.v2.Type.Map.keyType: object expected"); + message.keyType = $root.google.bigtable.v2.Type.fromObject(object.keyType); + } + if (object.valueType != null) { + if (typeof object.valueType !== "object") + throw TypeError(".google.bigtable.v2.Type.Map.valueType: object expected"); + message.valueType = $root.google.bigtable.v2.Type.fromObject(object.valueType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyType = null; + object.valueType = null; + } + if (message.keyType != null && message.hasOwnProperty("keyType")) + object.keyType = $root.google.bigtable.v2.Type.toObject(message.keyType, options); + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = $root.google.bigtable.v2.Type.toObject(message.valueType, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.inputType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stateType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + case 4: { + message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.decode(reader, reader.uint32()); + break; + } + case 5: { + message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.decode(reader, reader.uint32()); + break; + } + case 6: { + message.max = $root.google.bigtable.v2.Type.Aggregate.Max.decode(reader, reader.uint32()); + break; + } + case 7: { + message.min = $root.google.bigtable.v2.Type.Aggregate.Min.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inputType != null && message.hasOwnProperty("inputType")) { + var error = $root.google.bigtable.v2.Type.verify(message.inputType); + if (error) + return "inputType." + error; + } + if (message.stateType != null && message.hasOwnProperty("stateType")) { + var error = $root.google.bigtable.v2.Type.verify(message.stateType); + if (error) + return "stateType." + error; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Sum.verify(message.sum); + if (error) + return "sum." + error; + } + } + if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify(message.hllppUniqueCount); + if (error) + return "hllppUniqueCount." + error; + } + } + if (message.max != null && message.hasOwnProperty("max")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Max.verify(message.max); + if (error) + return "max." + error; + } + } + if (message.min != null && message.hasOwnProperty("min")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Min.verify(message.min); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate) + return object; + var message = new $root.google.bigtable.v2.Type.Aggregate(); + if (object.inputType != null) { + if (typeof object.inputType !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.inputType: object expected"); + message.inputType = $root.google.bigtable.v2.Type.fromObject(object.inputType); + } + if (object.stateType != null) { + if (typeof object.stateType !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.stateType: object expected"); + message.stateType = $root.google.bigtable.v2.Type.fromObject(object.stateType); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.sum: object expected"); + message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.fromObject(object.sum); + } + if (object.hllppUniqueCount != null) { + if (typeof object.hllppUniqueCount !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.hllppUniqueCount: object expected"); + message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount); + } + if (object.max != null) { + if (typeof object.max !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.max: object expected"); + message.max = $root.google.bigtable.v2.Type.Aggregate.Max.fromObject(object.max); + } + if (object.min != null) { + if (typeof object.min !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.min: object expected"); + message.min = $root.google.bigtable.v2.Type.Aggregate.Min.fromObject(object.min); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputType = null; + object.stateType = null; + } + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = $root.google.bigtable.v2.Type.toObject(message.inputType, options); + if (message.stateType != null && message.hasOwnProperty("stateType")) + object.stateType = $root.google.bigtable.v2.Type.toObject(message.stateType, options); + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.toObject(message.sum, options); + if (options.oneofs) + object.aggregator = "sum"; + } + if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { + object.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options); + if (options.oneofs) + object.aggregator = "hllppUniqueCount"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = $root.google.bigtable.v2.Type.Aggregate.Max.toObject(message.max, options); + if (options.oneofs) + object.aggregator = "max"; + } + if (message.min != null && message.hasOwnProperty("min")) { + object.min = $root.google.bigtable.v2.Type.Aggregate.Min.toObject(message.min, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadIterationStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowsSeenCount != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ReadIterationStats) + return object; + var message = new $root.google.bigtable.v2.ReadIterationStats(); + if (object.rowsSeenCount != null) + if ($util.Long) + (message.rowsSeenCount = $util.Long.fromValue(object.rowsSeenCount)).unsigned = 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)).unsigned = 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)).unsigned = 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)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.rowsSeenCount = options.longs === String ? "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() : long; + } else + object.rowsReturnedCount = options.longs === String ? "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() : long; + } else + object.cellsSeenCount = options.longs === String ? "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() : long; + } else + object.cellsReturnedCount = options.longs === String ? "0" : 0; + } + if (message.rowsSeenCount != null && message.hasOwnProperty("rowsSeenCount")) + 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 && message.hasOwnProperty("rowsReturnedCount")) + 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 && message.hasOwnProperty("cellsSeenCount")) + 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 && message.hasOwnProperty("cellsReturnedCount")) + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.frontendServerLatency != null && Object.hasOwnProperty.call(message, "frontendServerLatency")) + $root.google.protobuf.Duration.encode(message.frontendServerLatency, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RequestLatencyStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.frontendServerLatency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frontendServerLatency != null && message.hasOwnProperty("frontendServerLatency")) { + var error = $root.google.protobuf.Duration.verify(message.frontendServerLatency); + 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) { + if (object instanceof $root.google.bigtable.v2.RequestLatencyStats) + return object; + var message = new $root.google.bigtable.v2.RequestLatencyStats(); + if (object.frontendServerLatency != null) { + if (typeof object.frontendServerLatency !== "object") + throw TypeError(".google.bigtable.v2.RequestLatencyStats.frontendServerLatency: object expected"); + message.frontendServerLatency = $root.google.protobuf.Duration.fromObject(object.frontendServerLatency); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.frontendServerLatency = null; + if (message.frontendServerLatency != null && message.hasOwnProperty("frontendServerLatency")) + object.frontendServerLatency = $root.google.protobuf.Duration.toObject(message.frontendServerLatency, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.FullReadStatsView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.readIterationStats != null && message.hasOwnProperty("readIterationStats")) { + var error = $root.google.bigtable.v2.ReadIterationStats.verify(message.readIterationStats); + if (error) + return "readIterationStats." + error; + } + if (message.requestLatencyStats != null && message.hasOwnProperty("requestLatencyStats")) { + var error = $root.google.bigtable.v2.RequestLatencyStats.verify(message.requestLatencyStats); + 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) { + if (object instanceof $root.google.bigtable.v2.FullReadStatsView) + return object; + var message = new $root.google.bigtable.v2.FullReadStatsView(); + if (object.readIterationStats != null) { + if (typeof object.readIterationStats !== "object") + throw TypeError(".google.bigtable.v2.FullReadStatsView.readIterationStats: object expected"); + message.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.fromObject(object.readIterationStats); + } + if (object.requestLatencyStats != null) { + if (typeof object.requestLatencyStats !== "object") + throw TypeError(".google.bigtable.v2.FullReadStatsView.requestLatencyStats: object expected"); + message.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.fromObject(object.requestLatencyStats); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.readIterationStats = null; + object.requestLatencyStats = null; + } + if (message.readIterationStats != null && message.hasOwnProperty("readIterationStats")) + object.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.toObject(message.readIterationStats, options); + if (message.requestLatencyStats != null && message.hasOwnProperty("requestLatencyStats")) + object.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.toObject(message.requestLatencyStats, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RequestStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fullReadStatsView != null && message.hasOwnProperty("fullReadStatsView")) { + properties.statsView = 1; + { + var error = $root.google.bigtable.v2.FullReadStatsView.verify(message.fullReadStatsView); + 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) { + if (object instanceof $root.google.bigtable.v2.RequestStats) + return object; + var message = new $root.google.bigtable.v2.RequestStats(); + if (object.fullReadStatsView != null) { + if (typeof object.fullReadStatsView !== "object") + throw TypeError(".google.bigtable.v2.RequestStats.fullReadStatsView: object expected"); + message.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.fromObject(object.fullReadStatsView); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.fullReadStatsView != null && message.hasOwnProperty("fullReadStatsView")) { + object.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.toObject(message.fullReadStatsView, options); + 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; + })(); + + 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 + */ + + /** + * 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) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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); + return writer; + }; + + /** + * Encodes the specified FeatureFlags message, length delimited. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {google.bigtable.v2.IFeatureFlags} message FeatureFlags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureFlags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureFlags message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureFlags.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.FeatureFlags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureFlags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureFlags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureFlags message. + * @function verify + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureFlags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reverseScans != null && message.hasOwnProperty("reverseScans")) + if (typeof message.reverseScans !== "boolean") + return "reverseScans: boolean expected"; + if (message.mutateRowsRateLimit != null && message.hasOwnProperty("mutateRowsRateLimit")) + if (typeof message.mutateRowsRateLimit !== "boolean") + return "mutateRowsRateLimit: boolean expected"; + if (message.mutateRowsRateLimit2 != null && message.hasOwnProperty("mutateRowsRateLimit2")) + if (typeof message.mutateRowsRateLimit2 !== "boolean") + return "mutateRowsRateLimit2: boolean expected"; + if (message.lastScannedRowResponses != null && message.hasOwnProperty("lastScannedRowResponses")) + if (typeof message.lastScannedRowResponses !== "boolean") + return "lastScannedRowResponses: boolean expected"; + if (message.routingCookie != null && message.hasOwnProperty("routingCookie")) + if (typeof message.routingCookie !== "boolean") + return "routingCookie: boolean expected"; + if (message.retryInfo != null && message.hasOwnProperty("retryInfo")) + if (typeof message.retryInfo !== "boolean") + return "retryInfo: boolean expected"; + if (message.clientSideMetricsEnabled != null && message.hasOwnProperty("clientSideMetricsEnabled")) + if (typeof message.clientSideMetricsEnabled !== "boolean") + return "clientSideMetricsEnabled: boolean expected"; + return null; + }; + + /** + * Creates a FeatureFlags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags + */ + FeatureFlags.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.FeatureFlags) + return object; + var message = new $root.google.bigtable.v2.FeatureFlags(); + if (object.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); + return message; + }; + + /** + * Creates a plain object from a FeatureFlags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {google.bigtable.v2.FeatureFlags} message FeatureFlags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureFlags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.reverseScans = false; + object.mutateRowsRateLimit = false; + object.lastScannedRowResponses = false; + object.mutateRowsRateLimit2 = false; + object.routingCookie = false; + object.retryInfo = false; + object.clientSideMetricsEnabled = false; + } + if (message.reverseScans != null && message.hasOwnProperty("reverseScans")) + object.reverseScans = message.reverseScans; + if (message.mutateRowsRateLimit != null && message.hasOwnProperty("mutateRowsRateLimit")) + object.mutateRowsRateLimit = message.mutateRowsRateLimit; + if (message.lastScannedRowResponses != null && message.hasOwnProperty("lastScannedRowResponses")) + object.lastScannedRowResponses = message.lastScannedRowResponses; + if (message.mutateRowsRateLimit2 != null && message.hasOwnProperty("mutateRowsRateLimit2")) + object.mutateRowsRateLimit2 = message.mutateRowsRateLimit2; + if (message.routingCookie != null && message.hasOwnProperty("routingCookie")) + object.routingCookie = message.routingCookie; + if (message.retryInfo != null && message.hasOwnProperty("retryInfo")) + object.retryInfo = message.retryInfo; + if (message.clientSideMetricsEnabled != null && message.hasOwnProperty("clientSideMetricsEnabled")) + object.clientSideMetricsEnabled = message.clientSideMetricsEnabled; + return object; + }; + + /** + * Converts this FeatureFlags to JSON. + * @function toJSON + * @memberof google.bigtable.v2.FeatureFlags + * @instance + * @returns {Object.} JSON object + */ + FeatureFlags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureFlags + * @function getTypeUrl + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureFlags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.FeatureFlags"; + }; + + return FeatureFlags; + })(); + + v2.ResponseParams = (function() { + + /** + * Properties of a ResponseParams. + * @memberof google.bigtable.v2 + * @interface IResponseParams + * @property {string|null} [zoneId] ResponseParams zoneId + * @property {string|null} [clusterId] ResponseParams clusterId + */ + + /** + * Constructs a new ResponseParams. + * @memberof google.bigtable.v2 + * @classdesc Represents a ResponseParams. + * @implements IResponseParams + * @constructor + * @param {google.bigtable.v2.IResponseParams=} [properties] Properties to set + */ + function ResponseParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseParams zoneId. + * @member {string|null|undefined} zoneId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ + ResponseParams.prototype.zoneId = null; + + /** + * ResponseParams clusterId. + * @member {string|null|undefined} clusterId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ + ResponseParams.prototype.clusterId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResponseParams _zoneId. + * @member {"zoneId"|undefined} _zoneId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ + Object.defineProperty(ResponseParams.prototype, "_zoneId", { + get: $util.oneOfGetter($oneOfFields = ["zoneId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ResponseParams _clusterId. + * @member {"clusterId"|undefined} _clusterId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ + Object.defineProperty(ResponseParams.prototype, "_clusterId", { + get: $util.oneOfGetter($oneOfFields = ["clusterId"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ResponseParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.zoneId = reader.string(); + break; + } + case 2: { + message.clusterId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) { + properties._zoneId = 1; + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + } + if (message.clusterId != null && message.hasOwnProperty("clusterId")) { + properties._clusterId = 1; + if (!$util.isString(message.clusterId)) + return "clusterId: string 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) { + if (object instanceof $root.google.bigtable.v2.ResponseParams) + return object; + 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); + 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) { + if (!options) + options = {}; + var object = {}; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) { + object.zoneId = message.zoneId; + if (options.oneofs) + object._zoneId = "zoneId"; + } + if (message.clusterId != null && message.hasOwnProperty("clusterId")) { + object.clusterId = message.clusterId; + if (options.oneofs) + object._clusterId = "clusterId"; + } + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * 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) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + 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).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + 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 (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + 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); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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); + break; + } + } + 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); + break; + } + } + 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); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++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) + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @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; + })(); + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RoutingRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.routingParameters && message.routingParameters.length)) + message.routingParameters = []; + message.routingParameters.push($root.google.api.RoutingParameter.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.routingParameters != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.api.RoutingRule) + return object; + 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 (typeof object.routingParameters[i] !== "object") + throw TypeError(".google.api.RoutingRule.routingParameters: object expected"); + message.routingParameters[i] = $root.google.api.RoutingParameter.fromObject(object.routingParameters[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RoutingParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.pathTemplate = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.pathTemplate != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.api.RoutingParameter) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.pathTemplate = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.pathTemplate != null && message.hasOwnProperty("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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN 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[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} [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.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + 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) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + 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_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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("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]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + 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 (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.verification != null && message.hasOwnProperty("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 && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_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 (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 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()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.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 (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions 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.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {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 {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) + 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 uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.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()).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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + 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()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 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())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.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 (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.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[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.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); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + 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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + 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_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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("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; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.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()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions 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 uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + 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).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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())); + 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); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".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) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".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.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 + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions 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.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; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + if (message[".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()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 72295729: { + message[".google.api.routing"] = $root.google.api.RoutingRule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.api.routing"] != null && message.hasOwnProperty(".google.api.routing")) { + var error = $root.google.api.RoutingRule.verify(message[".google.api.routing"]); + if (error) + return ".google.api.routing." + 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) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.api.routing"] != null) { + if (typeof object[".google.api.routing"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.routing: object expected"); + message[".google.api.routing"] = $root.google.api.RoutingRule.fromObject(object[".google.api.routing"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + object[".google.api.routing"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + if (message[".google.api.routing"] != null && message.hasOwnProperty(".google.api.routing")) + object[".google.api.routing"] = $root.google.api.RoutingRule.toObject(message[".google.api.routing"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.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 + */ + + /** + * 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) + 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; + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + 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) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + 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; + } + 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) { + if (!options) + options = {}; + 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; + } + if (message.fieldPresence != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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; + 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; + })(); + + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("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]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + 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 && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + 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) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + 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 (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + 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_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_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) { + if (!options) + options = {}; + 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); + } + if (message.minimumEdition != null && message.hasOwnProperty("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 && message.hasOwnProperty("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} [features] FeatureSetEditionDefault features + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = 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) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + 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) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + 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_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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("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 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a 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) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + 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) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + 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) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + 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) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + 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) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + 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) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + 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) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + 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; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + return protobuf; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + return type; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/v2/protos/protos.json b/owl-bot-staging/v2/protos/protos.json new file mode 100644 index 000000000..dcfbd66a1 --- /dev/null +++ b/owl-bot-staging/v2/protos/protos.json @@ -0,0 +1,4202 @@ +{ + "nested": { + "google": { + "nested": { + "bigtable": { + "nested": { + "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/AuthorizedView", + "(google.api.resource_definition).pattern": "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_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/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(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": "*" + } + } + }, + { + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + ] + } + }, + { + "(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/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(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" + } + } + }, + { + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + ] + } + }, + { + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + ] + } + }, + { + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + ] + } + }, + { + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + ] + } + }, + { + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + ] + } + }, + { + "(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" + } + ] + }, + "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" + } + ] + } + } + }, + "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" + } + }, + "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" + } + }, + "appProfileId": { + "type": "string", + "id": 2 + } + } + }, + "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" + } + } + } + }, + "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" + } + } + } + } + } + }, + "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": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protoFormat": { + "type": "ProtoFormat", + "id": 4 + }, + "resumeToken": { + "type": "bytes", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "params": { + "keyType": "string", + "type": "Value", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteQueryResponse": { + "oneofs": { + "response": { + "oneof": [ + "metadata", + "results" + ] + } + }, + "fields": { + "metadata": { + "type": "ResultSetMetadata", + "id": 1 + }, + "results": { + "type": "PartialResultSet", + "id": 2 + } + } + }, + "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 + } + } + }, + "RowFilter": { + "oneofs": { + "filter": { + "oneof": [ + "chain", + "interleave", + "condition", + "sink", + "passAllFilter", + "blockAllFilter", + "rowKeyRegexFilter", + "rowSampleFilter", + "familyNameRegexFilter", + "columnQualifierRegexFilter", + "columnRangeFilter", + "timestampRangeFilter", + "valueRegexFilter", + "valueRangeFilter", + "cellsPerRowOffsetFilter", + "cellsPerRowLimitFilter", + "cellsPerColumnLimitFilter", + "stripValueTransformer", + "applyLabelTransformer" + ] + } + }, + "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 + } + }, + "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" + ] + } + }, + "fields": { + "protoRowsBatch": { + "type": "ProtoRowsBatch", + "id": 3 + }, + "resumeToken": { + "type": "bytes", + "id": 5 + }, + "estimatedBatchSize": { + "type": "int32", + "id": 4 + } + } + }, + "Type": { + "oneofs": { + "kind": { + "oneof": [ + "bytesType", + "stringType", + "int64Type", + "float32Type", + "float64Type", + "boolType", + "timestampType", + "dateType", + "aggregateType", + "structType", + "arrayType", + "mapType" + ] + } + }, + "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 + } + }, + "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" + ] + } + }, + "fields": { + "bigEndianBytes": { + "type": "BigEndianBytes", + "id": 1 + } + }, + "nested": { + "BigEndianBytes": { + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1 + } + } + } + } + } + } + }, + "Bool": { + "fields": {} + }, + "Float32": { + "fields": {} + }, + "Float64": { + "fields": {} + }, + "Timestamp": { + "fields": {} + }, + "Date": { + "fields": {} + }, + "Struct": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1 + } + }, + "nested": { + "Field": { + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "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 + } + } + }, + "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 + } + } + }, + "ResponseParams": { + "oneofs": { + "_zoneId": { + "oneof": [ + "zoneId" + ] + }, + "_clusterId": { + "oneof": [ + "clusterId" + ] + } + }, + "fields": { + "zoneId": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "clusterId": { + "type": "string", + "id": 2, + "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", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "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 + } + } + }, + "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 + } + } + }, + "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 + } + } + }, + "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 + } + }, + "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": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "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": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "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 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "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": { + "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 + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "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 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "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": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "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": { + "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": { + "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": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 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 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "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 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "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 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "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" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/v2/samples/generated/v2/bigtable.check_and_mutate_row.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.check_and_mutate_row.js new file mode 100644 index 000000000..966599ef5 --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.check_and_mutate_row.js @@ -0,0 +1,108 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.execute_query.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.execute_query.js new file mode 100644 index 000000000..8d5d4732d --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.execute_query.js @@ -0,0 +1,114 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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. + */ + // const query = 'abc123' + /** + * 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. + * In case of Value.kind is not set, it will be set to corresponding null + * value in googlesql. + * `params"firstName" = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * Value.type should always be set and no inference of type will be made from + * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + * error. + */ + // const params = [1,2,3,4] + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable').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/owl-bot-staging/v2/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js new file mode 100644 index 000000000..c89d25a15 --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_row.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_row.js new file mode 100644 index 000000000..5d8aa3627 --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_row.js @@ -0,0 +1,91 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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] + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable').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/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_rows.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_rows.js new file mode 100644 index 000000000..5b4448f99 --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_rows.js @@ -0,0 +1,90 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.ping_and_warm.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.ping_and_warm.js new file mode 100644 index 000000000..33f684935 --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.ping_and_warm.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.read_change_stream.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_change_stream.js new file mode 100644 index 000000000..9f1b4be29 --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_change_stream.js @@ -0,0 +1,110 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.read_modify_write_row.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_modify_write_row.js new file mode 100644 index 000000000..b27219cfa --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_modify_write_row.js @@ -0,0 +1,92 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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. + */ + // const rules = [1,2,3,4] + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable').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/owl-bot-staging/v2/samples/generated/v2/bigtable.read_rows.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_rows.js new file mode 100644 index 000000000..e23f512cf --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_rows.js @@ -0,0 +1,110 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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' + /** + * 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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.sample_row_keys.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.sample_row_keys.js new file mode 100644 index 000000000..01d16cd10 --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/bigtable.sample_row_keys.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + + /** + * NOTE: This sample is autogenerated, but this library contains handwritten + * samples that are the recommended way to use this library. Please refer to + * samples outside of the generated/ folder for these recommendations. + */ +'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' + /** + * 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').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/owl-bot-staging/v2/samples/generated/v2/snippet_metadata_google.bigtable.v2.json b/owl-bot-staging/v2/samples/generated/v2/snippet_metadata_google.bigtable.v2.json new file mode 100644 index 000000000..a96efbfc8 --- /dev/null +++ b/owl-bot-staging/v2/samples/generated/v2/snippet_metadata_google.bigtable.v2.json @@ -0,0 +1,571 @@ +{ + "clientLibrary": { + "name": "nodejs-bigtable", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.bigtable.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "bigtable_v2_generated_Bigtable_ReadRows_async", + "title": "bigtable readRows Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": false, + "file": "bigtable.read_rows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 102, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadRows", + "fullName": "google.bigtable.v2.Bigtable.ReadRows", + "async": true, + "parameters": [ + { + "name": "table_name", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "rows", + "type": ".google.bigtable.v2.RowSet" + }, + { + "name": "filter", + "type": ".google.bigtable.v2.RowFilter" + }, + { + "name": "rows_limit", + "type": "TYPE_INT64" + }, + { + "name": "request_stats_view", + "type": ".google.bigtable.v2.ReadRowsRequest.RequestStatsView" + }, + { + "name": "reversed", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.bigtable.v2.ReadRowsResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "ReadRows", + "fullName": "google.bigtable.v2.Bigtable.ReadRows", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_SampleRowKeys_async", + "title": "bigtable sampleRowKeys Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": false, + "file": "bigtable.sample_row_keys.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SampleRowKeys", + "fullName": "google.bigtable.v2.Bigtable.SampleRowKeys", + "async": true, + "parameters": [ + { + "name": "table_name", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.v2.SampleRowKeysResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "SampleRowKeys", + "fullName": "google.bigtable.v2.Bigtable.SampleRowKeys", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_MutateRow_async", + "title": "bigtable mutateRow Sample", + "origin": "API_DEFINITION", + "description": " Mutates a row atomically. Cells already present in the row are left unchanged unless explicitly changed by `mutation`.", + "canonical": false, + "file": "bigtable.mutate_row.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 83, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MutateRow", + "fullName": "google.bigtable.v2.Bigtable.MutateRow", + "async": true, + "parameters": [ + { + "name": "table_name", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "row_key", + "type": "TYPE_BYTES" + }, + { + "name": "mutations", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.bigtable.v2.MutateRowResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "MutateRow", + "fullName": "google.bigtable.v2.Bigtable.MutateRow", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_MutateRows_async", + "title": "bigtable mutateRows Sample", + "origin": "API_DEFINITION", + "description": " Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, but the entire batch is not executed atomically.", + "canonical": false, + "file": "bigtable.mutate_rows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MutateRows", + "fullName": "google.bigtable.v2.Bigtable.MutateRows", + "async": true, + "parameters": [ + { + "name": "table_name", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "entries", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.bigtable.v2.MutateRowsResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "MutateRows", + "fullName": "google.bigtable.v2.Bigtable.MutateRows", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_CheckAndMutateRow_async", + "title": "bigtable checkAndMutateRow Sample", + "origin": "API_DEFINITION", + "description": " Mutates a row atomically based on the output of a predicate Reader filter.", + "canonical": false, + "file": "bigtable.check_and_mutate_row.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 100, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckAndMutateRow", + "fullName": "google.bigtable.v2.Bigtable.CheckAndMutateRow", + "async": true, + "parameters": [ + { + "name": "table_name", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "row_key", + "type": "TYPE_BYTES" + }, + { + "name": "predicate_filter", + "type": ".google.bigtable.v2.RowFilter" + }, + { + "name": "true_mutations", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "false_mutations", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.bigtable.v2.CheckAndMutateRowResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "CheckAndMutateRow", + "fullName": "google.bigtable.v2.Bigtable.CheckAndMutateRow", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_PingAndWarm_async", + "title": "bigtable pingAndWarm Sample", + "origin": "API_DEFINITION", + "description": " Warm up associated instance metadata for this connection. This call is not required but may be useful for connection keep-alive.", + "canonical": false, + "file": "bigtable.ping_and_warm.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PingAndWarm", + "fullName": "google.bigtable.v2.Bigtable.PingAndWarm", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.v2.PingAndWarmResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "PingAndWarm", + "fullName": "google.bigtable.v2.Bigtable.PingAndWarm", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async", + "title": "bigtable readModifyWriteRow Sample", + "origin": "API_DEFINITION", + "description": " 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.", + "canonical": false, + "file": "bigtable.read_modify_write_row.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadModifyWriteRow", + "fullName": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", + "async": true, + "parameters": [ + { + "name": "table_name", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "row_key", + "type": "TYPE_BYTES" + }, + { + "name": "rules", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.bigtable.v2.ReadModifyWriteRowResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "ReadModifyWriteRow", + "fullName": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async", + "title": "bigtable generateInitialChangeStreamPartitions Sample", + "origin": "API_DEFINITION", + "description": " NOTE: This API is intended to be used by Apache Beam BigtableIO. 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`.", + "canonical": false, + "file": "bigtable.generate_initial_change_stream_partitions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateInitialChangeStreamPartitions", + "fullName": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", + "async": true, + "parameters": [ + { + "name": "table_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "GenerateInitialChangeStreamPartitions", + "fullName": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_ReadChangeStream_async", + "title": "bigtable readChangeStream Sample", + "origin": "API_DEFINITION", + "description": " NOTE: This API is intended to be used by Apache Beam BigtableIO. Reads changes from a table's change stream. Changes will reflect both user-initiated mutations and mutations that are caused by garbage collection.", + "canonical": false, + "file": "bigtable.read_change_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 102, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadChangeStream", + "fullName": "google.bigtable.v2.Bigtable.ReadChangeStream", + "async": true, + "parameters": [ + { + "name": "table_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "partition", + "type": ".google.bigtable.v2.StreamPartition" + }, + { + "name": "start_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "continuation_tokens", + "type": ".google.bigtable.v2.StreamContinuationTokens" + }, + { + "name": "end_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "heartbeat_duration", + "type": ".google.protobuf.Duration" + } + ], + "resultType": ".google.bigtable.v2.ReadChangeStreamResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "ReadChangeStream", + "fullName": "google.bigtable.v2.Bigtable.ReadChangeStream", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_ExecuteQuery_async", + "title": "bigtable executeQuery Sample", + "origin": "API_DEFINITION", + "description": " Executes a BTQL query against a particular Cloud Bigtable instance.", + "canonical": false, + "file": "bigtable.execute_query.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 106, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteQuery", + "fullName": "google.bigtable.v2.Bigtable.ExecuteQuery", + "async": true, + "parameters": [ + { + "name": "instance_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "query", + "type": "TYPE_STRING" + }, + { + "name": "proto_format", + "type": ".google.bigtable.v2.ProtoFormat" + }, + { + "name": "resume_token", + "type": "TYPE_BYTES" + }, + { + "name": "params", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.bigtable.v2.ExecuteQueryResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "ExecuteQuery", + "fullName": "google.bigtable.v2.Bigtable.ExecuteQuery", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } + } + ] +} diff --git a/owl-bot-staging/v2/src/index.ts b/owl-bot-staging/v2/src/index.ts new file mode 100644 index 000000000..ce6bd1620 --- /dev/null +++ b/owl-bot-staging/v2/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 v2 from './v2'; +const BigtableClient = v2.BigtableClient; +type BigtableClient = v2.BigtableClient; +export {v2, BigtableClient}; +export default {v2, BigtableClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/v2/src/v2/bigtable_client.ts b/owl-bot-staging/v2/src/v2/bigtable_client.ts new file mode 100644 index 000000000..10a81027a --- /dev/null +++ b/owl-bot-staging/v2/src/v2/bigtable_client.ts @@ -0,0 +1,1451 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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'); + +/** + * 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; + 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://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [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}' + ), + 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', '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(); + 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 {object} [options] + * Call options. See {@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. + */ + 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/[^/]+/authorizedViews/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { authorized_view_name: parameterValue }); + } + } + } + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams( + routingParameter + ); + this.initialize(); + return this.innerApiCalls.mutateRow(request, options, callback); + } +/** + * 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/
`. + * @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. + */ + 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/[^/]+/authorizedViews/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { authorized_view_name: parameterValue }); + } + } + } + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams( + routingParameter + ); + this.initialize(); + return this.innerApiCalls.checkAndMutateRow(request, options, callback); + } +/** + * 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. + */ + 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(); + return this.innerApiCalls.pingAndWarm(request, options, callback); + } +/** + * 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/
`. + * @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. + * @param {object} [options] + * Call options. See {@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. + */ + 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/[^/]+/authorizedViews/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { authorized_view_name: parameterValue }); + } + } + } + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams( + routingParameter + ); + this.initialize(); + return this.innerApiCalls.readModifyWriteRow(request, options, callback); + } + +/** + * 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/
`. + * @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.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. + */ + 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/[^/]+/authorizedViews/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { authorized_view_name: parameterValue }); + } + } + } + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams( + routingParameter + ); + this.initialize(); + 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. + * + * @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/
`. + * @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.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 {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. + */ + 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/[^/]+/authorizedViews/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { authorized_view_name: parameterValue }); + } + } + } + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams( + routingParameter + ); + this.initialize(); + 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/
`. + * @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. + */ + 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/[^/]+/authorizedViews/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { authorized_view_name: parameterValue }); + } + } + } + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams( + routingParameter + ); + this.initialize(); + return this.innerApiCalls.mutateRows(request, options); + } + +/** + * NOTE: This API is intended to be used by Apache Beam BigtableIO. + * 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`. + * + * @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/
`. + * 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. + */ + 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(); + return this.innerApiCalls.generateInitialChangeStreamPartitions(request, options); + } + +/** + * NOTE: This API is intended to be used by Apache Beam BigtableIO. + * Reads changes from a table's change stream. Changes will + * reflect both user-initiated mutations and mutations that are caused by + * garbage collection. + * + * @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/
`. + * 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. + */ + 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(); + return this.innerApiCalls.readChangeStream(request, options); + } + +/** + * Executes a BTQL query against a particular Cloud 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. + * @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. + * + * In case of Value.kind is not set, it will be set to corresponding null + * value in googlesql. + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * + * Value.type should always be set and no inference of type will be made from + * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + * error. + * @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. + */ + 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(); + 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 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._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/v2/src/v2/bigtable_client_config.json b/owl-bot-staging/v2/src/v2/bigtable_client_config.json new file mode 100644 index 000000000..08b7ab94c --- /dev/null +++ b/owl-bot-staging/v2/src/v2/bigtable_client_config.json @@ -0,0 +1,83 @@ +{ + "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" + }, + "ExecuteQuery": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/v2/src/v2/bigtable_proto_list.json b/owl-bot-staging/v2/src/v2/bigtable_proto_list.json new file mode 100644 index 000000000..f09278289 --- /dev/null +++ b/owl-bot-staging/v2/src/v2/bigtable_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/bigtable/v2/bigtable.proto", + "../../protos/google/bigtable/v2/data.proto", + "../../protos/google/bigtable/v2/feature_flags.proto", + "../../protos/google/bigtable/v2/request_stats.proto", + "../../protos/google/bigtable/v2/response_params.proto", + "../../protos/google/bigtable/v2/types.proto" +] diff --git a/owl-bot-staging/v2/src/v2/gapic_metadata.json b/owl-bot-staging/v2/src/v2/gapic_metadata.json new file mode 100644 index 000000000..2f87579e9 --- /dev/null +++ b/owl-bot-staging/v2/src/v2/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.bigtable.v2", + "libraryPackage": "@google-cloud/bigtable", + "services": { + "Bigtable": { + "clients": { + "grpc": { + "libraryClient": "BigtableClient", + "rpcs": { + "MutateRow": { + "methods": [ + "mutateRow" + ] + }, + "CheckAndMutateRow": { + "methods": [ + "checkAndMutateRow" + ] + }, + "PingAndWarm": { + "methods": [ + "pingAndWarm" + ] + }, + "ReadModifyWriteRow": { + "methods": [ + "readModifyWriteRow" + ] + }, + "ReadRows": { + "methods": [ + "readRows" + ] + }, + "SampleRowKeys": { + "methods": [ + "sampleRowKeys" + ] + }, + "MutateRows": { + "methods": [ + "mutateRows" + ] + }, + "GenerateInitialChangeStreamPartitions": { + "methods": [ + "generateInitialChangeStreamPartitions" + ] + }, + "ReadChangeStream": { + "methods": [ + "readChangeStream" + ] + }, + "ExecuteQuery": { + "methods": [ + "executeQuery" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BigtableClient", + "rpcs": { + "MutateRow": { + "methods": [ + "mutateRow" + ] + }, + "CheckAndMutateRow": { + "methods": [ + "checkAndMutateRow" + ] + }, + "PingAndWarm": { + "methods": [ + "pingAndWarm" + ] + }, + "ReadModifyWriteRow": { + "methods": [ + "readModifyWriteRow" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/v2/src/v2/index.ts b/owl-bot-staging/v2/src/v2/index.ts new file mode 100644 index 000000000..b99419be9 --- /dev/null +++ b/owl-bot-staging/v2/src/v2/index.ts @@ -0,0 +1,19 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 {BigtableClient} from './bigtable_client'; diff --git a/owl-bot-staging/v2/system-test/fixtures/sample/src/index.js b/owl-bot-staging/v2/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000..ab5a19204 --- /dev/null +++ b/owl-bot-staging/v2/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 bigtable = require('@google-cloud/bigtable'); + +function main() { + const bigtableClient = new bigtable.BigtableClient(); +} + +main(); diff --git a/owl-bot-staging/v2/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/v2/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000..677af6830 --- /dev/null +++ b/owl-bot-staging/v2/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 {BigtableClient} from '@google-cloud/bigtable'; + +// check that the client class type name can be used +function doStuffWithBigtableClient(client: BigtableClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const bigtableClient = new BigtableClient(); + doStuffWithBigtableClient(bigtableClient); +} + +main(); diff --git a/owl-bot-staging/v2/system-test/install.ts b/owl-bot-staging/v2/system-test/install.ts new file mode 100644 index 000000000..fd5bfdc71 --- /dev/null +++ b/owl-bot-staging/v2/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/v2/test/gapic_bigtable_v2.ts b/owl-bot-staging/v2/test/gapic_bigtable_v2.ts new file mode 100644 index 000000000..268cc5fd1 --- /dev/null +++ b/owl-bot-staging/v2/test/gapic_bigtable_v2.ts @@ -0,0 +1,1585 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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(); + assert(client.bigtableStub); + client.close().then(() => { + done(); + }); + }); + + 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(); + }); + }); + + 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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedError = new Error('The client has already been closed.'); + client.close(); + 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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedError = new Error('The client has already been closed.'); + client.close(); + 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', + }); + 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', + }); + 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', + }); + 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', + }); + 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(); + 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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readModifyWriteRow(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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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({gaxServerStreamingRetries: true}); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedError = new Error('The client has already been closed.'); + client.close(); + 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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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({gaxServerStreamingRetries: true}); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedError = new Error('The client has already been closed.'); + client.close(); + 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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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({gaxServerStreamingRetries: true}); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsRequest() + ); + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedError = new Error('The client has already been closed.'); + client.close(); + 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', + }); + 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({gaxServerStreamingRetries: true}); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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({gaxServerStreamingRetries: true}); + 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', + }); + 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', + }); + 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(); + 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', + }); + 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({gaxServerStreamingRetries: true}); + 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', + }); + 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', + }); + 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(); + 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', () => { + 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', + }); + 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', () => { + 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', + }); + 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('table', () => { + 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', + }); + 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/owl-bot-staging/v2/tsconfig.json b/owl-bot-staging/v2/tsconfig.json new file mode 100644 index 000000000..c78f1c884 --- /dev/null +++ b/owl-bot-staging/v2/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/owl-bot-staging/v2/webpack.config.js b/owl-bot-staging/v2/webpack.config.js new file mode 100644 index 000000000..9b488aad8 --- /dev/null +++ b/owl-bot-staging/v2/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: 'bigtable', + filename: './bigtable.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', +}; From 0a2cdb5ed5dc256da37aa8cbdc2a0c123d11162c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Sep 2024 16:39:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- owl-bot-staging/admin/v2/.eslintignore | 7 - owl-bot-staging/admin/v2/.eslintrc.json | 3 - owl-bot-staging/admin/v2/.gitignore | 14 - owl-bot-staging/admin/v2/.jsdoc.js | 55 - owl-bot-staging/admin/v2/.mocharc.js | 33 - owl-bot-staging/admin/v2/.prettierrc.js | 22 - owl-bot-staging/admin/v2/README.md | 1 - owl-bot-staging/admin/v2/package.json | 59 - .../admin/v2/bigtable_instance_admin.proto | 751 - .../admin/v2/bigtable_table_admin.proto | 1434 - .../google/bigtable/admin/v2/common.proto | 54 - .../google/bigtable/admin/v2/instance.proto | 414 - .../google/bigtable/admin/v2/table.proto | 581 - .../google/bigtable/admin/v2/types.proto | 294 - owl-bot-staging/admin/v2/protos/protos.d.ts | 24392 ------- owl-bot-staging/admin/v2/protos/protos.js | 60034 ---------------- owl-bot-staging/admin/v2/protos/protos.json | 6161 -- ...table_instance_admin.create_app_profile.js | 79 - .../bigtable_instance_admin.create_cluster.js | 76 - ...bigtable_instance_admin.create_instance.js | 85 - ...table_instance_admin.delete_app_profile.js | 68 - .../bigtable_instance_admin.delete_cluster.js | 62 - ...bigtable_instance_admin.delete_instance.js | 62 - ...bigtable_instance_admin.get_app_profile.js | 62 - .../v2/bigtable_instance_admin.get_cluster.js | 62 - .../bigtable_instance_admin.get_iam_policy.js | 67 - .../bigtable_instance_admin.get_instance.js | 62 - ...gtable_instance_admin.list_app_profiles.js | 81 - .../bigtable_instance_admin.list_clusters.js | 69 - ...igtable_instance_admin.list_hot_tablets.js | 92 - .../bigtable_instance_admin.list_instances.js | 66 - ...e_instance_admin.partial_update_cluster.js | 68 - ..._instance_admin.partial_update_instance.js | 68 - .../bigtable_instance_admin.set_iam_policy.js | 77 - ...ble_instance_admin.test_iam_permissions.js | 70 - ...table_instance_admin.update_app_profile.js | 72 - .../bigtable_instance_admin.update_cluster.js | 95 - ...bigtable_instance_admin.update_instance.js | 102 - .../bigtable_table_admin.check_consistency.js | 80 - .../v2/bigtable_table_admin.copy_backup.js | 94 - ...able_table_admin.create_authorized_view.js | 77 - .../v2/bigtable_table_admin.create_backup.js | 79 - .../v2/bigtable_table_admin.create_table.js | 91 - ..._table_admin.create_table_from_snapshot.js | 77 - ...able_table_admin.delete_authorized_view.js | 70 - .../v2/bigtable_table_admin.delete_backup.js | 63 - .../bigtable_table_admin.delete_snapshot.js | 63 - .../v2/bigtable_table_admin.delete_table.js | 63 - .../v2/bigtable_table_admin.drop_row_range.js | 72 - ..._table_admin.generate_consistency_token.js | 63 - ...igtable_table_admin.get_authorized_view.js | 68 - .../v2/bigtable_table_admin.get_backup.js | 63 - .../v2/bigtable_table_admin.get_iam_policy.js | 67 - .../v2/bigtable_table_admin.get_snapshot.js | 63 - .../v2/bigtable_table_admin.get_table.js | 68 - ...table_table_admin.list_authorized_views.js | 84 - .../v2/bigtable_table_admin.list_backups.js | 131 - .../v2/bigtable_table_admin.list_snapshots.js | 76 - .../v2/bigtable_table_admin.list_tables.js | 83 - ...able_table_admin.modify_column_families.js | 75 - .../v2/bigtable_table_admin.restore_table.js | 76 - .../v2/bigtable_table_admin.set_iam_policy.js | 77 - .../v2/bigtable_table_admin.snapshot_table.js | 90 - ...gtable_table_admin.test_iam_permissions.js | 70 - .../v2/bigtable_table_admin.undelete_table.js | 64 - ...able_table_admin.update_authorized_view.js | 80 - .../v2/bigtable_table_admin.update_backup.js | 73 - .../v2/bigtable_table_admin.update_table.js | 77 - ...pet_metadata_google.bigtable.admin.v2.json | 2395 - owl-bot-staging/admin/v2/src/index.ts | 27 - .../src/v2/bigtable_instance_admin_client.ts | 2951 - ...bigtable_instance_admin_client_config.json | 139 - .../bigtable_instance_admin_proto_list.json | 8 - .../v2/src/v2/bigtable_table_admin_client.ts | 4182 -- .../bigtable_table_admin_client_config.json | 175 - .../v2/bigtable_table_admin_proto_list.json | 8 - .../admin/v2/src/v2/gapic_metadata.json | 571 - owl-bot-staging/admin/v2/src/v2/index.ts | 20 - .../system-test/fixtures/sample/src/index.js | 28 - .../system-test/fixtures/sample/src/index.ts | 38 - .../admin/v2/system-test/install.ts | 49 - .../test/gapic_bigtable_instance_admin_v2.ts | 3532 - .../v2/test/gapic_bigtable_table_admin_v2.ts | 4916 -- owl-bot-staging/admin/v2/tsconfig.json | 19 - owl-bot-staging/admin/v2/webpack.config.js | 64 - owl-bot-staging/v2/.eslintignore | 7 - owl-bot-staging/v2/.eslintrc.json | 3 - owl-bot-staging/v2/.gitignore | 14 - owl-bot-staging/v2/.jsdoc.js | 55 - owl-bot-staging/v2/.mocharc.js | 33 - owl-bot-staging/v2/.prettierrc.js | 22 - owl-bot-staging/v2/README.md | 1 - owl-bot-staging/v2/package.json | 58 - .../protos/google/bigtable/v2/bigtable.proto | 1102 - .../v2/protos/google/bigtable/v2/data.proto | 777 - .../google/bigtable/v2/feature_flags.proto | 64 - .../google/bigtable/v2/request_stats.proto | 113 - .../google/bigtable/v2/response_params.proto | 38 - owl-bot-staging/v2/protos/protos.d.ts | 18201 ----- owl-bot-staging/v2/protos/protos.js | 46519 ------------ owl-bot-staging/v2/protos/protos.json | 4202 -- .../v2/bigtable.check_and_mutate_row.js | 108 - ...nerate_initial_change_stream_partitions.js | 76 - .../generated/v2/bigtable.mutate_row.js | 91 - .../generated/v2/bigtable.mutate_rows.js | 90 - .../generated/v2/bigtable.ping_and_warm.js | 72 - .../v2/bigtable.read_change_stream.js | 110 - .../v2/bigtable.read_modify_write_row.js | 92 - .../generated/v2/bigtable.read_rows.js | 110 - .../generated/v2/bigtable.sample_row_keys.js | 80 - .../snippet_metadata_google.bigtable.v2.json | 571 - owl-bot-staging/v2/src/index.ts | 25 - owl-bot-staging/v2/src/v2/bigtable_client.ts | 1451 - .../v2/src/v2/bigtable_client_config.json | 83 - .../v2/src/v2/bigtable_proto_list.json | 8 - owl-bot-staging/v2/src/v2/gapic_metadata.json | 93 - owl-bot-staging/v2/src/v2/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - owl-bot-staging/v2/system-test/install.ts | 49 - owl-bot-staging/v2/test/gapic_bigtable_v2.ts | 1585 - owl-bot-staging/v2/tsconfig.json | 19 - owl-bot-staging/v2/webpack.config.js | 64 - .../admin/v2/bigtable_instance_admin.proto | 2 +- .../admin/v2/bigtable_table_admin.proto | 6 +- protos/google/bigtable/admin/v2/common.proto | 2 +- .../google/bigtable/admin/v2/instance.proto | 2 +- protos/google/bigtable/admin/v2/table.proto | 50 +- protos/google/bigtable/admin/v2/types.proto | 159 +- protos/google/bigtable/v2/bigtable.proto | 96 +- protos/google/bigtable/v2/data.proto | 170 +- protos/google/bigtable/v2/feature_flags.proto | 2 +- protos/google/bigtable/v2/request_stats.proto | 2 +- .../google/bigtable/v2/response_params.proto | 2 +- .../google/bigtable/v2/types.proto | 0 protos/protos.d.ts | 12726 +++- protos/protos.js | 33606 ++++++--- protos/protos.json | 748 +- .../generated/v2/bigtable.execute_query.js | 0 .../v2/bigtable_table_admin.copy_backup.js | 2 +- ...pet_metadata_google.bigtable.admin.v2.json | 2 +- .../snippet_metadata_google.bigtable.v2.json | 60 + src/v2/bigtable_client.ts | 97 + src/v2/bigtable_client_config.json | 4 + src/v2/bigtable_proto_list.json | 3 +- src/v2/bigtable_table_admin_client.ts | 4 +- test/gapic_bigtable_v2.ts | 159 + 147 files changed, 33166 insertions(+), 208055 deletions(-) delete mode 100644 owl-bot-staging/admin/v2/.eslintignore delete mode 100644 owl-bot-staging/admin/v2/.eslintrc.json delete mode 100644 owl-bot-staging/admin/v2/.gitignore delete mode 100644 owl-bot-staging/admin/v2/.jsdoc.js delete mode 100644 owl-bot-staging/admin/v2/.mocharc.js delete mode 100644 owl-bot-staging/admin/v2/.prettierrc.js delete mode 100644 owl-bot-staging/admin/v2/README.md delete mode 100644 owl-bot-staging/admin/v2/package.json delete mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto delete mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_table_admin.proto delete mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/common.proto delete mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/instance.proto delete mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/table.proto delete mode 100644 owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/types.proto delete mode 100644 owl-bot-staging/admin/v2/protos/protos.d.ts delete mode 100644 owl-bot-staging/admin/v2/protos/protos.js delete mode 100644 owl-bot-staging/admin/v2/protos/protos.json delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_app_profile.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_cluster.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_instance.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_cluster.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_instance.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_app_profile.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_cluster.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_instance.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_clusters.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_instances.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_app_profile.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_cluster.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_instance.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.check_consistency.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.copy_backup.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_authorized_view.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_backup.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_backup.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_snapshot.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_table.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.drop_row_range.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_authorized_view.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_backup.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_iam_policy.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_snapshot.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_table.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_authorized_views.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_backups.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_snapshots.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_tables.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.modify_column_families.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.restore_table.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.set_iam_policy.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.snapshot_table.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.undelete_table.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_authorized_view.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_backup.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_table.js delete mode 100644 owl-bot-staging/admin/v2/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json delete mode 100644 owl-bot-staging/admin/v2/src/index.ts delete mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client.ts delete mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client_config.json delete mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_proto_list.json delete mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client.ts delete mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client_config.json delete mode 100644 owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_proto_list.json delete mode 100644 owl-bot-staging/admin/v2/src/v2/gapic_metadata.json delete mode 100644 owl-bot-staging/admin/v2/src/v2/index.ts delete mode 100644 owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/admin/v2/system-test/install.ts delete mode 100644 owl-bot-staging/admin/v2/test/gapic_bigtable_instance_admin_v2.ts delete mode 100644 owl-bot-staging/admin/v2/test/gapic_bigtable_table_admin_v2.ts delete mode 100644 owl-bot-staging/admin/v2/tsconfig.json delete mode 100644 owl-bot-staging/admin/v2/webpack.config.js delete mode 100644 owl-bot-staging/v2/.eslintignore delete mode 100644 owl-bot-staging/v2/.eslintrc.json delete mode 100644 owl-bot-staging/v2/.gitignore delete mode 100644 owl-bot-staging/v2/.jsdoc.js delete mode 100644 owl-bot-staging/v2/.mocharc.js delete mode 100644 owl-bot-staging/v2/.prettierrc.js delete mode 100644 owl-bot-staging/v2/README.md delete mode 100644 owl-bot-staging/v2/package.json delete mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/bigtable.proto delete mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/data.proto delete mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/feature_flags.proto delete mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/request_stats.proto delete mode 100644 owl-bot-staging/v2/protos/google/bigtable/v2/response_params.proto delete mode 100644 owl-bot-staging/v2/protos/protos.d.ts delete mode 100644 owl-bot-staging/v2/protos/protos.js delete mode 100644 owl-bot-staging/v2/protos/protos.json delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.check_and_mutate_row.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_row.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_rows.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.ping_and_warm.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.read_change_stream.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.read_modify_write_row.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.read_rows.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/bigtable.sample_row_keys.js delete mode 100644 owl-bot-staging/v2/samples/generated/v2/snippet_metadata_google.bigtable.v2.json delete mode 100644 owl-bot-staging/v2/src/index.ts delete mode 100644 owl-bot-staging/v2/src/v2/bigtable_client.ts delete mode 100644 owl-bot-staging/v2/src/v2/bigtable_client_config.json delete mode 100644 owl-bot-staging/v2/src/v2/bigtable_proto_list.json delete mode 100644 owl-bot-staging/v2/src/v2/gapic_metadata.json delete mode 100644 owl-bot-staging/v2/src/v2/index.ts delete mode 100644 owl-bot-staging/v2/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/v2/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/v2/system-test/install.ts delete mode 100644 owl-bot-staging/v2/test/gapic_bigtable_v2.ts delete mode 100644 owl-bot-staging/v2/tsconfig.json delete mode 100644 owl-bot-staging/v2/webpack.config.js rename {owl-bot-staging/v2/protos => protos}/google/bigtable/v2/types.proto (100%) rename {owl-bot-staging/v2/samples => samples}/generated/v2/bigtable.execute_query.js (100%) diff --git a/owl-bot-staging/admin/v2/.eslintignore b/owl-bot-staging/admin/v2/.eslintignore deleted file mode 100644 index cfc348ec4..000000000 --- a/owl-bot-staging/admin/v2/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/admin/v2/.eslintrc.json b/owl-bot-staging/admin/v2/.eslintrc.json deleted file mode 100644 index 782153495..000000000 --- a/owl-bot-staging/admin/v2/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/admin/v2/.gitignore b/owl-bot-staging/admin/v2/.gitignore deleted file mode 100644 index d4f03a0df..000000000 --- a/owl-bot-staging/admin/v2/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.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/owl-bot-staging/admin/v2/.jsdoc.js b/owl-bot-staging/admin/v2/.jsdoc.js deleted file mode 100644 index 0b0d11479..000000000 --- a/owl-bot-staging/admin/v2/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/bigtable', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/admin/v2/.mocharc.js b/owl-bot-staging/admin/v2/.mocharc.js deleted file mode 100644 index 13b67c34e..000000000 --- a/owl-bot-staging/admin/v2/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/admin/v2/.prettierrc.js b/owl-bot-staging/admin/v2/.prettierrc.js deleted file mode 100644 index 9a8fd6909..000000000 --- a/owl-bot-staging/admin/v2/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/admin/v2/README.md b/owl-bot-staging/admin/v2/README.md deleted file mode 100644 index 5d45b74ed..000000000 --- a/owl-bot-staging/admin/v2/README.md +++ /dev/null @@ -1 +0,0 @@ -Admin: Nodejs Client diff --git a/owl-bot-staging/admin/v2/package.json b/owl-bot-staging/admin/v2/package.json deleted file mode 100644 index 3c1209d53..000000000 --- a/owl-bot-staging/admin/v2/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@google-cloud/bigtable", - "version": "0.1.0", - "description": "Admin client for Node.js", - "repository": "googleapis/nodejs-admin", - "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 build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto deleted file mode 100644 index 5e3fe7aff..000000000 --- a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto +++ /dev/null @@ -1,751 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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"; - } - - // 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: "*" - }; - 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: "*" - }; - 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: "*" - }; - 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"; - } -} - -// 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. - // Currently, at most four clusters can be specified. - 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; -} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_table_admin.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_table_admin.proto deleted file mode 100644 index 1fdcefa4a..000000000 --- a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/bigtable_table_admin.proto +++ /dev/null @@ -1,1434 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 Table or Backup 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: "*" - } - }; - option (google.api.method_signature) = "resource"; - } - - // Sets the access control policy on a Table or Backup 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: "*" - } - }; - option (google.api.method_signature) = "resource,policy"; - } - - // Returns permissions that the caller has on the specified Table or Backup - // 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: "*" - } - }; - option (google.api.method_signature) = "resource,permissions"; - } -} - -// 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` - // - // 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]; -} - -// 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 CreateInstance 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 views' 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//instances//tables/
/authorizedViews/ - 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]; -} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/common.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/common.proto deleted file mode 100644 index fe28f5fa8..000000000 --- a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/common.proto +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/instance.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/instance.proto deleted file mode 100644 index 188dae7eb..000000000 --- a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/instance.proto +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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}" - }; - - // 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; - } - - // 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]; - - // (`OutputOnly`) - // The current state of the instance. - State state = 3; - - // The type of the instance. Defaults to `PRODUCTION`. - Type type = 4; - - // 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 server-assigned 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]; -} - -// 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}" - }; - - // 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; - } - - // 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. - // 3) All clusters within an instance must use the same CMEK key. - // 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 allocated to this cluster. More nodes enable higher - // throughput and more consistent performance. - int32 serve_nodes = 4; - - 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}" - }; - - // 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 { - // 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; - } - - // 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 on your Bigtable data, without impacting the - // performance of the clusters that handle your application traffic. - // Currently, Data Boost exclusively supports read-only use-cases with - // single-cluster routing. - // - // Data Boost reads are only guaranteed to see the results of writes that - // were written at least 30 minutes ago. This means newly written values may - // not become visible for up to 30m, and also means that old values may - // remain visible for up to 30m after being deleted or overwritten. To - // mitigate the staleness of the data, users may either wait 30m, or use - // CheckConsistency. - 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}" - }; - - // 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]; -} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/table.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/table.proto deleted file mode 100644 index b2ef458c8..000000000 --- a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/table.proto +++ /dev/null @@ -1,581 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. The only - // supported value at this time is 3 days. - google.protobuf.Duration retention_period = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. How frequently automated backups should occur. The only - // supported value at this time is 24 hours. - google.protobuf.Duration frequency = 2 - [(google.api.field_behavior) = REQUIRED]; - } - - // 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; - } -} - -// 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; -} diff --git a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/types.proto b/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/types.proto deleted file mode 100644 index 49c50d176..000000000 --- a/owl-bot-staging/admin/v2/protos/google/bigtable/admin/v2/types.proto +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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/from the underlying data. -// -// Each encoding also defines the following properties: -// -// * Order-preserving: Does the encoded value sort consistently with the -// original typed value? Note that Bigtable will always sort data based on -// the raw encoded value, *not* the decoded type. -// - Example: BYTES values sort in the same order as their raw encodings. -// - Counterexample: Encoding INT64 as a fixed-width decimal string does -// *not* preserve sort order when dealing with negative numbers. -// `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. -// * Self-delimiting: If we concatenate two encoded values, can we always tell -// where the first one ends and the second one begins? -// - Example: If we encode INT64s to fixed-width STRINGs, the first value -// will always contain exactly N digits, possibly preceded by a sign. -// - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have -// no way to tell where the first one ends. -// * Compatibility: Which other systems have matching encoding schemes? For -// example, does this encoding have a GoogleSQL equivalent? HBase? Java? -message Type { - // Bytes - // Values of type `Bytes` are stored in `Value.bytes_value`. - message Bytes { - // Rules used to convert to/from lower level types. - message Encoding { - // Leaves the value "as-is" - // * Order-preserving? Yes - // * Self-delimiting? No - // * Compatibility? N/A - message Raw {} - - // Which encoding to use. - oneof encoding { - // Use `Raw` encoding. - Raw raw = 1; - } - } - - // The encoding to use when converting to/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/from lower level types. - message Encoding { - // Deprecated: prefer the equivalent `Utf8Bytes`. - message Utf8Raw { - option deprecated = true; - } - - // UTF-8 encoding - // * Order-preserving? Yes (code point order) - // * Self-delimiting? No - // * Compatibility? - // - BigQuery Federation `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/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/from lower level types. - message Encoding { - // Encodes the value as an 8-byte big endian twos complement `Bytes` - // value. - // * Order-preserving? No (positive values only) - // * Self-delimiting? Yes - // * Compatibility? - // - BigQuery Federation `BINARY` encoding - // - HBase `Bytes.toBytes` - // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` - message BigEndianBytes { - // Deprecated: ignored if set. - Bytes bytes_type = 1; - } - - // Which encoding to use. - oneof encoding { - // Use `BigEndianBytes` encoding. - BigEndianBytes big_endian_bytes = 1; - } - } - - // The encoding to use when converting to/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 {} - - // 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; - } - - // The names and types of the fields in this struct. - repeated Field fields = 1; - } - - // 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; - } -} diff --git a/owl-bot-staging/admin/v2/protos/protos.d.ts b/owl-bot-staging/admin/v2/protos/protos.d.ts deleted file mode 100644 index c0c8232f5..000000000 --- a/owl-bot-staging/admin/v2/protos/protos.d.ts +++ /dev/null @@ -1,24392 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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; - } - - 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; - } - - /** 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 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 labels */ - labels?: ({ [k: string]: string }|null); - - /** Instance createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Instance satisfiesPzs */ - satisfiesPzs?: (boolean|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 labels. */ - public labels: { [k: string]: string }; - - /** Instance createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Instance satisfiesPzs. */ - public satisfiesPzs?: (boolean|null); - - /** Instance _satisfiesPzs. */ - public _satisfiesPzs?: "satisfiesPzs"; - - /** - * 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 - } - } - - /** 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 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 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 - } - - /** 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); - } - - /** 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[]; - - /** - * 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; - } - - /** 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); - - /** DataBoostIsolationReadOnly _computeBillingOwner. */ - public _computeBillingOwner?: "computeBillingOwner"; - - /** - * 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; - } - - /** 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; - } - - 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; - } - - /** 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|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|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|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|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); - } - - /** 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); - - /** - * 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 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); - } - - /** 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 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); - } - - /** 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); - - /** - * 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 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); - } - - /** 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 kind. */ - public kind?: ("bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"); - - /** - * 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); - } - - /** 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 encoding. */ - public encoding?: "bigEndianBytes"; - - /** - * 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 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 { - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.admin.v2.Type.ITimestamp); - - /** - * 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; - } - - /** 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); - } - - /** 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[]; - - /** - * 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 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 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); - } - - /** 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[]; - - /** - * 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); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** 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); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** 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 - } - - /** 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; - } - } - - /** 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_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 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 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); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** 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); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions 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.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 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 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 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 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 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.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } - - /** Represents a 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|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a 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); - } - - /** 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); - - /** - * 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 - } - } - - /** 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 features */ - features?: (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 features. */ - public features?: (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 - } - } - } - - /** 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|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of 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; - } - } - - /** 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|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|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; - } - } - - /** 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; - } - } -} diff --git a/owl-bot-staging/admin/v2/protos/protos.js b/owl-bot-staging/admin/v2/protos/protos.js deleted file mode 100644 index 699e7e260..000000000 --- a/owl-bot-staging/admin/v2/protos/protos.js +++ /dev/null @@ -1,60034 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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_protos || ($protobuf.roots._google_cloud_bigtable_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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 - */ - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - 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()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.clusters[key] = value; - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.instance != null && message.hasOwnProperty("instance")) { - var error = $root.google.bigtable.admin.v2.Instance.verify(message.instance); - if (error) - return "instance." + error; - } - if (message.clusters != null && message.hasOwnProperty("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]]); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateInstanceRequest) - return object; - 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 (typeof object.instance !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest.instance: object expected"); - message.instance = $root.google.bigtable.admin.v2.Instance.fromObject(object.instance); - } - if (object.clusters) { - if (typeof object.clusters !== "object") - 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 (typeof object.clusters[keys[i]] !== "object") - 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]]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.clusters = {}; - if (options.defaults) { - object.parent = ""; - object.instanceId = ""; - object.instance = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options); - var keys2; - if (message.clusters && (keys2 = Object.keys(message.clusters)).length) { - object.clusters = {}; - for (var j = 0; j < keys2.length; ++j) - object.clusters[keys2[j]] = $root.google.bigtable.admin.v2.Cluster.toObject(message.clusters[keys2[j]], options); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.GetInstanceRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListInstancesRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.instances != null && message.hasOwnProperty("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]); - if (error) - return "instances." + error; - } - } - if (message.failedLocations != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListInstancesResponse) - return object; - 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 (typeof object.instances[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse.instances: object expected"); - message.instances[i] = $root.google.bigtable.admin.v2.Instance.fromObject(object.instances[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.instance = $root.google.bigtable.admin.v2.Instance.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.instance != null && message.hasOwnProperty("instance")) { - var error = $root.google.bigtable.admin.v2.Instance.verify(message.instance); - if (error) - return "instance." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest) - return object; - var message = new $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest(); - if (object.instance != null) { - if (typeof object.instance !== "object") - throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest.instance: object expected"); - message.instance = $root.google.bigtable.admin.v2.Instance.fromObject(object.instance); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.instance = null; - object.updateMask = null; - } - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.DeleteInstanceRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) { - var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateClusterRequest) - return object; - 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 (typeof object.cluster !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateClusterRequest.cluster: object expected"); - message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.clusterId = ""; - object.cluster = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.GetClusterRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListClustersRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusters != null && message.hasOwnProperty("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]); - if (error) - return "clusters." + error; - } - } - if (message.failedLocations != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListClustersResponse) - return object; - 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 (typeof object.clusters[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListClustersResponse.clusters: object expected"); - message.clusters[i] = $root.google.bigtable.admin.v2.Cluster.fromObject(object.clusters[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.DeleteClusterRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.CreateInstanceRequest.verify(message.originalRequest); - if (error) - return "originalRequest." + error; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateInstanceMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.CreateInstanceMetadata(); - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.fromObject(object.originalRequest); - } - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalRequest = null; - object.requestTime = null; - object.finishTime = null; - } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.verify(message.originalRequest); - if (error) - return "originalRequest." + error; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateInstanceMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.UpdateInstanceMetadata(); - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.fromObject(object.originalRequest); - } - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalRequest = null; - object.requestTime = null; - object.finishTime = null; - } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - 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()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tables[key] = value; - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.CreateClusterRequest.verify(message.originalRequest); - if (error) - return "originalRequest." + error; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - if (error) - return "finishTime." + error; - } - if (message.tables != null && message.hasOwnProperty("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]]); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateClusterMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.CreateClusterMetadata(); - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.fromObject(object.originalRequest); - } - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - if (object.tables) { - if (typeof object.tables !== "object") - 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 (typeof object.tables[keys[i]] !== "object") - 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]]); - } - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - var keys2; - if (message.tables && (keys2 = Object.keys(message.tables)).length) { - object.tables = {}; - for (var j = 0; j < keys2.length; ++j) - object.tables[keys2[j]] = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.toObject(message.tables[keys2[j]], options); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.estimatedSizeBytes != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress) - return object; - var message = new $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress(); - if (object.estimatedSizeBytes != null) - if ($util.Long) - (message.estimatedSizeBytes = $util.Long.fromValue(object.estimatedSizeBytes)).unsigned = 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)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.estimatedSizeBytes = options.longs === String ? "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() : long; - } else - object.estimatedCopiedBytes = options.longs === String ? "0" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.estimatedSizeBytes != null && message.hasOwnProperty("estimatedSizeBytes")) - 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 && message.hasOwnProperty("estimatedCopiedBytes")) - 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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.originalRequest = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.Cluster.verify(message.originalRequest); - if (error) - return "originalRequest." + error; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateClusterMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.UpdateClusterMetadata(); - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.Cluster.fromObject(object.originalRequest); - } - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalRequest = null; - object.requestTime = null; - object.finishTime = null; - } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.Cluster.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - if (error) - return "finishTime." + error; - } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.verify(message.originalRequest); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata(); - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.fromObject(object.originalRequest); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.requestTime = null; - object.finishTime = null; - object.originalRequest = null; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.toObject(message.originalRequest, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.cluster = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) { - var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster); - if (error) - return "cluster." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterRequest) - return object; - var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterRequest(); - if (object.cluster != null) { - if (typeof object.cluster !== "object") - throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.cluster: object expected"); - message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cluster = null; - object.updateMask = null; - } - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 4: { - message.ignoreWarnings = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) { - var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile); - if (error) - return "appProfile." + error; - } - if (message.ignoreWarnings != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateAppProfileRequest) - return object; - 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 (typeof object.appProfile !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateAppProfileRequest.appProfile: object expected"); - message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.appProfileId = ""; - object.appProfile = null; - object.ignoreWarnings = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) - object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.GetAppProfileRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.appProfiles != null && message.hasOwnProperty("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]); - if (error) - return "appProfiles." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.failedLocations != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesResponse) - return object; - 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 (typeof object.appProfiles[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: object expected"); - message.appProfiles[i] = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfiles[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.nextPageToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.appProfile = $root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.ignoreWarnings = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) { - var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile); - if (error) - return "appProfile." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.ignoreWarnings != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileRequest) - return object; - var message = new $root.google.bigtable.admin.v2.UpdateAppProfileRequest(); - if (object.appProfile != null) { - if (typeof object.appProfile !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.appProfile: object expected"); - message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.appProfile = null; - object.updateMask = null; - object.ignoreWarnings = false; - } - if (message.appProfile != null && message.hasOwnProperty("appProfile")) - object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.ignoreWarnings = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.ignoreWarnings != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.DeleteAppProfileRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.ignoreWarnings = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.ignoreWarnings != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.pageSize = reader.int32(); - break; - } - case 5: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.ListHotTabletsRequest) - return object; - var message = new $root.google.bigtable.admin.v2.ListHotTabletsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.startTime = null; - object.endTime = null; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hotTablets != null && message.hasOwnProperty("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]); - if (error) - return "hotTablets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListHotTabletsResponse) - return object; - 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 (typeof object.hotTablets[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListHotTabletsResponse.hotTablets: object expected"); - message.hotTablets[i] = $root.google.bigtable.admin.v2.HotTablet.fromObject(object.hotTablets[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.nextPageToken != null && message.hasOwnProperty("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.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 {Object.|null} [labels] Instance labels - * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime - * @property {boolean|null} [satisfiesPzs] Instance satisfiesPzs - */ - - /** - * 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 = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - 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 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; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Instance _satisfiesPzs. - * @member {"satisfiesPzs"|undefined} _satisfiesPzs - * @memberof google.bigtable.admin.v2.Instance - * @instance - */ - Object.defineProperty(Instance.prototype, "_satisfiesPzs", { - get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.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()).ldelim(); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.satisfiesPzs = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - properties._satisfiesPzs = 1; - if (typeof message.satisfiesPzs !== "boolean") - return "satisfiesPzs: boolean 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) { - if (object instanceof $root.google.bigtable.admin.v2.Instance) - return object; - 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; - } - if (object.labels) { - if (typeof object.labels !== "object") - 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) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Instance.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - 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) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - 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; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.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 && message.hasOwnProperty("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) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - object.satisfiesPzs = message.satisfiesPzs; - if (options.oneofs) - object._satisfiesPzs = "satisfiesPzs"; - } - 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; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 2: { - message.cpuUtilizationPercent = reader.int32(); - break; - } - case 3: { - message.storageUtilizationGibPerNode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpuUtilizationPercent != null && message.hasOwnProperty("cpuUtilizationPercent")) - if (!$util.isInteger(message.cpuUtilizationPercent)) - return "cpuUtilizationPercent: integer expected"; - if (message.storageUtilizationGibPerNode != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.AutoscalingTargets) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpuUtilizationPercent = 0; - object.storageUtilizationGibPerNode = 0; - } - if (message.cpuUtilizationPercent != null && message.hasOwnProperty("cpuUtilizationPercent")) - object.cpuUtilizationPercent = message.cpuUtilizationPercent; - if (message.storageUtilizationGibPerNode != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.minServeNodes = reader.int32(); - break; - } - case 2: { - message.maxServeNodes = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.minServeNodes != null && message.hasOwnProperty("minServeNodes")) - if (!$util.isInteger(message.minServeNodes)) - return "minServeNodes: integer expected"; - if (message.maxServeNodes != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.AutoscalingLimits) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.minServeNodes = 0; - object.maxServeNodes = 0; - } - if (message.minServeNodes != null && message.hasOwnProperty("minServeNodes")) - object.minServeNodes = message.minServeNodes; - if (message.maxServeNodes != null && message.hasOwnProperty("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.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) - 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 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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()).ldelim(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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 7: { - message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.defaultStorageType = reader.int32(); - break; - } - case 6: { - message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.serveNodes != null && message.hasOwnProperty("serveNodes")) - if (!$util.isInteger(message.serveNodes)) - return "serveNodes: integer expected"; - if (message.clusterConfig != null && message.hasOwnProperty("clusterConfig")) { - properties.config = 1; - { - var error = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.verify(message.clusterConfig); - if (error) - return "clusterConfig." + error; - } - } - if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) - switch (message.defaultStorageType) { - default: - return "defaultStorageType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { - var error = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.verify(message.encryptionConfig); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Cluster) - return object; - 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; - if (object.clusterConfig != null) { - if (typeof object.clusterConfig !== "object") - throw TypeError(".google.bigtable.admin.v2.Cluster.clusterConfig: object expected"); - message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.fromObject(object.clusterConfig); - } - 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 (typeof object.encryptionConfig !== "object") - throw TypeError(".google.bigtable.admin.v2.Cluster.encryptionConfig: object expected"); - message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.fromObject(object.encryptionConfig); - } - 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) { - if (!options) - options = {}; - 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; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.state != null && message.hasOwnProperty("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 && message.hasOwnProperty("serveNodes")) - object.serveNodes = message.serveNodes; - if (message.defaultStorageType != null && message.hasOwnProperty("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 && message.hasOwnProperty("encryptionConfig")) - object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options); - if (message.clusterConfig != null && message.hasOwnProperty("clusterConfig")) { - object.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.toObject(message.clusterConfig, options); - if (options.oneofs) - object.config = "clusterConfig"; - } - 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; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.decode(reader, reader.uint32()); - break; - } - case 2: { - message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) { - var error = $root.google.bigtable.admin.v2.AutoscalingLimits.verify(message.autoscalingLimits); - if (error) - return "autoscalingLimits." + error; - } - if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) { - var error = $root.google.bigtable.admin.v2.AutoscalingTargets.verify(message.autoscalingTargets); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) - return object; - var message = new $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig(); - if (object.autoscalingLimits != null) { - if (typeof object.autoscalingLimits !== "object") - throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingLimits: object expected"); - message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.fromObject(object.autoscalingLimits); - } - if (object.autoscalingTargets != null) { - if (typeof object.autoscalingTargets !== "object") - throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingTargets: object expected"); - message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.fromObject(object.autoscalingTargets); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.autoscalingLimits = null; - object.autoscalingTargets = null; - } - if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) - object.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.toObject(message.autoscalingLimits, options); - if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) - object.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.toObject(message.autoscalingTargets, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterAutoscalingConfig != null && message.hasOwnProperty("clusterAutoscalingConfig")) { - var error = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify(message.clusterAutoscalingConfig); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterConfig) - return object; - var message = new $root.google.bigtable.admin.v2.Cluster.ClusterConfig(); - if (object.clusterAutoscalingConfig != null) { - if (typeof object.clusterAutoscalingConfig !== "object") - throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterConfig.clusterAutoscalingConfig: object expected"); - message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.fromObject(object.clusterAutoscalingConfig); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.clusterAutoscalingConfig = null; - if (message.clusterAutoscalingConfig != null && message.hasOwnProperty("clusterAutoscalingConfig")) - object.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.toObject(message.clusterAutoscalingConfig, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); - return writer; - }; - - /** - * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.kmsKeyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - return null; - }; - - /** - * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig - */ - EncryptionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.Cluster.EncryptionConfig) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.kmsKeyName = ""; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - return object; - }; - - /** - * Converts this EncryptionConfig to JSON. - * @function toJSON - * @memberof google.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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - if (message.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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 6: { - message.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.decode(reader, reader.uint32()); - break; - } - case 7: { - message.priority = reader.int32(); - break; - } - case 11: { - message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.decode(reader, reader.uint32()); - break; - } - case 10: { - message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.multiClusterRoutingUseAny != null && message.hasOwnProperty("multiClusterRoutingUseAny")) { - properties.routingPolicy = 1; - { - var error = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.verify(message.multiClusterRoutingUseAny); - if (error) - return "multiClusterRoutingUseAny." + error; - } - } - if (message.singleClusterRouting != null && message.hasOwnProperty("singleClusterRouting")) { - if (properties.routingPolicy === 1) - return "routingPolicy: multiple values"; - properties.routingPolicy = 1; - { - var error = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.verify(message.singleClusterRouting); - if (error) - return "singleClusterRouting." + error; - } - } - if (message.priority != null && message.hasOwnProperty("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 && message.hasOwnProperty("standardIsolation")) { - if (properties.isolation === 1) - return "isolation: multiple values"; - properties.isolation = 1; - { - var error = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.verify(message.standardIsolation); - if (error) - return "standardIsolation." + error; - } - } - if (message.dataBoostIsolationReadOnly != null && message.hasOwnProperty("dataBoostIsolationReadOnly")) { - if (properties.isolation === 1) - return "isolation: multiple values"; - properties.isolation = 1; - { - var error = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify(message.dataBoostIsolationReadOnly); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.AppProfile) - return object; - 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 (typeof object.multiClusterRoutingUseAny !== "object") - throw TypeError(".google.bigtable.admin.v2.AppProfile.multiClusterRoutingUseAny: object expected"); - message.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.fromObject(object.multiClusterRoutingUseAny); - } - if (object.singleClusterRouting != null) { - if (typeof object.singleClusterRouting !== "object") - throw TypeError(".google.bigtable.admin.v2.AppProfile.singleClusterRouting: object expected"); - message.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.fromObject(object.singleClusterRouting); - } - 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 (typeof object.standardIsolation !== "object") - throw TypeError(".google.bigtable.admin.v2.AppProfile.standardIsolation: object expected"); - message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.fromObject(object.standardIsolation); - } - if (object.dataBoostIsolationReadOnly != null) { - if (typeof object.dataBoostIsolationReadOnly !== "object") - throw TypeError(".google.bigtable.admin.v2.AppProfile.dataBoostIsolationReadOnly: object expected"); - message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.fromObject(object.dataBoostIsolationReadOnly); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.multiClusterRoutingUseAny != null && message.hasOwnProperty("multiClusterRoutingUseAny")) { - object.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.toObject(message.multiClusterRoutingUseAny, options); - if (options.oneofs) - object.routingPolicy = "multiClusterRoutingUseAny"; - } - if (message.singleClusterRouting != null && message.hasOwnProperty("singleClusterRouting")) { - object.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.toObject(message.singleClusterRouting, options); - if (options.oneofs) - object.routingPolicy = "singleClusterRouting"; - } - if (message.priority != null && message.hasOwnProperty("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 && message.hasOwnProperty("dataBoostIsolationReadOnly")) { - object.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.toObject(message.dataBoostIsolationReadOnly, options); - if (options.oneofs) - object.isolation = "dataBoostIsolationReadOnly"; - } - if (message.standardIsolation != null && message.hasOwnProperty("standardIsolation")) { - object.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.toObject(message.standardIsolation, options); - 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 - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MultiClusterRoutingUseAny clusterIds. - * @member {Array.} clusterIds - * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny - * @instance - */ - MultiClusterRoutingUseAny.prototype.clusterIds = $util.emptyArray; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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]); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - if (!(message.clusterIds && message.clusterIds.length)) - message.clusterIds = []; - message.clusterIds.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterIds != null && message.hasOwnProperty("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"; - } - 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) { - if (object instanceof $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) - return object; - 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]); - } - 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) { - if (!options) - options = {}; - 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]; - } - 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"; - }; - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.clusterId = reader.string(); - break; - } - case 2: { - message.allowTransactionalWrites = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.allowTransactionalWrites != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clusterId = ""; - object.allowTransactionalWrites = false; - } - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.allowTransactionalWrites != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.priority = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.priority != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.AppProfile.StandardIsolation) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.priority = options.enums === String ? "PRIORITY_UNSPECIFIED" : 0; - if (message.priority != null && message.hasOwnProperty("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) - 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; - - /** - * DataBoostIsolationReadOnly _computeBillingOwner. - * @member {"computeBillingOwner"|undefined} _computeBillingOwner - * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly - * @instance - */ - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.computeBillingOwner = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.computeBillingOwner != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (message.computeBillingOwner != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.startKey != null && message.hasOwnProperty("startKey")) - if (!$util.isString(message.startKey)) - return "startKey: string expected"; - if (message.endKey != null && message.hasOwnProperty("endKey")) - if (!$util.isString(message.endKey)) - return "endKey: string expected"; - if (message.nodeCpuUsagePercent != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.HotTablet) - return object; - 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 (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.HotTablet.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.HotTablet.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("name")) - object.name = message.name; - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.startKey != null && message.hasOwnProperty("startKey")) - object.startKey = message.startKey; - if (message.endKey != null && message.hasOwnProperty("endKey")) - object.endKey = message.endKey; - if (message.nodeCpuUsagePercent != null && message.hasOwnProperty("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; - })(); - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.progressPercent = reader.int32(); - break; - } - case 2: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) - if (!$util.isInteger(message.progressPercent)) - return "progressPercent: integer expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - 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) { - if (object instanceof $root.google.bigtable.admin.v2.OperationProgress) - return object; - var message = new $root.google.bigtable.admin.v2.OperationProgress(); - if (object.progressPercent != null) - message.progressPercent = object.progressPercent | 0; - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.OperationProgress.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.OperationProgress.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.progressPercent = 0; - object.startTime = null; - object.endTime = null; - } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) - object.progressPercent = message.progressPercent; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - 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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 - */ - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.backup != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.RestoreTableRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tableId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.backup != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 4: { - message.optimizeTableOperationName = reader.string(); - break; - } - case 5: { - message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - switch (message.sourceType) { - default: - return "sourceType: enum value expected"; - case 0: - case 1: - break; - } - if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { - properties.sourceInfo = 1; - { - var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo); - if (error) - return "backupInfo." + error; - } - } - if (message.optimizeTableOperationName != null && message.hasOwnProperty("optimizeTableOperationName")) - if (!$util.isString(message.optimizeTableOperationName)) - return "optimizeTableOperationName: string expected"; - if (message.progress != null && message.hasOwnProperty("progress")) { - var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.RestoreTableMetadata) - return object; - 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 (typeof object.backupInfo !== "object") - throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata.backupInfo: object expected"); - message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo); - } - if (object.optimizeTableOperationName != null) - message.optimizeTableOperationName = String(object.optimizeTableOperationName); - if (object.progress != null) { - if (typeof object.progress !== "object") - throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata.progress: object expected"); - message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress); - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sourceType != null && message.hasOwnProperty("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 && message.hasOwnProperty("backupInfo")) { - object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options); - if (options.oneofs) - object.sourceInfo = "backupInfo"; - } - if (message.optimizeTableOperationName != null && message.hasOwnProperty("optimizeTableOperationName")) - object.optimizeTableOperationName = message.optimizeTableOperationName; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.progress != null && message.hasOwnProperty("progress")) { - var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.OptimizeRestoredTableMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.OptimizeRestoredTableMetadata(); - if (object.name != null) - message.name = String(object.name); - if (object.progress != null) { - if (typeof object.progress !== "object") - throw TypeError(".google.bigtable.admin.v2.OptimizeRestoredTableMetadata.progress: object expected"); - message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.progress = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.table != null && message.hasOwnProperty("table")) { - var error = $root.google.bigtable.admin.v2.Table.verify(message.table); - if (error) - return "table." + error; - } - if (message.initialSplits != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateTableRequest) - return object; - 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 (typeof object.table !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.table: object expected"); - message.table = $root.google.bigtable.admin.v2.Table.fromObject(object.table); - } - 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 (typeof object.initialSplits[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.initialSplits: object expected"); - message.initialSplits[i] = $root.google.bigtable.admin.v2.CreateTableRequest.Split.fromObject(object.initialSplits[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.initialSplits = []; - if (options.defaults) { - object.parent = ""; - object.tableId = ""; - object.table = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.table != null && message.hasOwnProperty("table")) - object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options); - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.key = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateTableRequest.Split) - return object; - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.sourceSnapshot != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tableId = ""; - object.sourceSnapshot = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.sourceSnapshot != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.rowKeyPrefix != null && message.hasOwnProperty("rowKeyPrefix")) { - properties.target = 1; - if (!(message.rowKeyPrefix && typeof message.rowKeyPrefix.length === "number" || $util.isString(message.rowKeyPrefix))) - return "rowKeyPrefix: buffer expected"; - } - if (message.deleteAllDataFromTable != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.DropRowRangeRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.rowKeyPrefix != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - case 4: - break; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - 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) { - if (object instanceof $root.google.bigtable.admin.v2.ListTablesRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.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 && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tables != null && message.hasOwnProperty("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]); - if (error) - return "tables." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListTablesResponse) - return object; - 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 (typeof object.tables[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListTablesResponse.tables: object expected"); - message.tables[i] = $root.google.bigtable.admin.v2.Table.fromObject(object.tables[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.nextPageToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - case 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) { - if (object instanceof $root.google.bigtable.admin.v2.GetTableRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.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 - */ - - /** - * 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) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.table = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) { - var error = $root.google.bigtable.admin.v2.Table.verify(message.table); - if (error) - return "table." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an 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) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateTableRequest) - return object; - var message = new $root.google.bigtable.admin.v2.UpdateTableRequest(); - if (object.table != null) { - if (typeof object.table !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest.table: object expected"); - message.table = $root.google.bigtable.admin.v2.Table.fromObject(object.table); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.table = null; - object.updateMask = null; - } - if (message.table != null && message.hasOwnProperty("table")) - object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - 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) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateTableMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.UpdateTableMetadata(); - if (object.name != null) - message.name = String(object.name); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.startTime = null; - object.endTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.DeleteTableRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates 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) { - if (object instanceof $root.google.bigtable.admin.v2.UndeleteTableRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - 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) { - if (object instanceof $root.google.bigtable.admin.v2.UndeleteTableMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.UndeleteTableMetadata(); - if (object.name != null) - message.name = String(object.name); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.startTime = null; - object.endTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - case 3: { - message.ignoreWarnings = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.modifications != null && message.hasOwnProperty("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]); - if (error) - return "modifications." + error; - } - } - if (message.ignoreWarnings != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) - return object; - 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 (typeof object.modifications[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.modifications: object expected"); - message.modifications[i] = $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.fromObject(object.modifications[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.modifications = []; - if (options.defaults) { - object.name = ""; - object.ignoreWarnings = false; - } - if (message.name != null && message.hasOwnProperty("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); - } - if (message.ignoreWarnings != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.create != null && Object.hasOwnProperty.call(message, "create")) - $root.google.bigtable.admin.v2.ColumnFamily.encode(message.create, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.create = $root.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32()); - break; - } - case 3: { - message.update = $root.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32()); - break; - } - case 4: { - message.drop = reader.bool(); - break; - } - case 6: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.create != null && message.hasOwnProperty("create")) { - properties.mod = 1; - { - var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.create); - if (error) - return "create." + error; - } - } - if (message.update != null && message.hasOwnProperty("update")) { - if (properties.mod === 1) - return "mod: multiple values"; - properties.mod = 1; - { - var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.update); - if (error) - return "update." + error; - } - } - if (message.drop != null && message.hasOwnProperty("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 && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) - return object; - var message = new $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification(); - if (object.id != null) - message.id = String(object.id); - if (object.create != null) { - if (typeof object.create !== "object") - throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.create: object expected"); - message.create = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.create); - } - if (object.update != null) { - if (typeof object.update !== "object") - throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.update: object expected"); - message.update = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.update); - } - if (object.drop != null) - message.drop = Boolean(object.drop); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.updateMask = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.create != null && message.hasOwnProperty("create")) { - object.create = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.create, options); - if (options.oneofs) - object.mod = "create"; - } - if (message.update != null && message.hasOwnProperty("update")) { - object.update = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.update, options); - if (options.oneofs) - object.mod = "update"; - } - if (message.drop != null && message.hasOwnProperty("drop")) { - object.drop = message.drop; - if (options.oneofs) - object.mod = "drop"; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.consistencyToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consistencyToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.consistencyToken = ""; - if (message.consistencyToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 4: { - message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) - if (!$util.isString(message.consistencyToken)) - return "consistencyToken: string expected"; - if (message.standardReadRemoteWrites != null && message.hasOwnProperty("standardReadRemoteWrites")) { - properties.mode = 1; - { - var error = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.verify(message.standardReadRemoteWrites); - if (error) - return "standardReadRemoteWrites." + error; - } - } - if (message.dataBoostReadLocalWrites != null && message.hasOwnProperty("dataBoostReadLocalWrites")) { - if (properties.mode === 1) - return "mode: multiple values"; - properties.mode = 1; - { - var error = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.verify(message.dataBoostReadLocalWrites); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CheckConsistencyRequest) - return object; - 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 (typeof object.standardReadRemoteWrites !== "object") - throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.standardReadRemoteWrites: object expected"); - message.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.fromObject(object.standardReadRemoteWrites); - } - if (object.dataBoostReadLocalWrites != null) { - if (typeof object.dataBoostReadLocalWrites !== "object") - throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.dataBoostReadLocalWrites: object expected"); - message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.fromObject(object.dataBoostReadLocalWrites); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.consistencyToken = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) - object.consistencyToken = message.consistencyToken; - if (message.standardReadRemoteWrites != null && message.hasOwnProperty("standardReadRemoteWrites")) { - object.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.toObject(message.standardReadRemoteWrites, options); - if (options.oneofs) - object.mode = "standardReadRemoteWrites"; - } - if (message.dataBoostReadLocalWrites != null && message.hasOwnProperty("dataBoostReadLocalWrites")) { - object.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.toObject(message.dataBoostReadLocalWrites, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.consistent = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consistent != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.CheckConsistencyResponse) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.consistent = false; - if (message.consistent != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) - if (!$util.isString(message.cluster)) - return "cluster: string expected"; - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) - if (!$util.isString(message.snapshotId)) - return "snapshotId: string expected"; - if (message.ttl != null && message.hasOwnProperty("ttl")) { - var error = $root.google.protobuf.Duration.verify(message.ttl); - if (error) - return "ttl." + error; - } - if (message.description != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.SnapshotTableRequest) - return object; - 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 (typeof object.ttl !== "object") - throw TypeError(".google.bigtable.admin.v2.SnapshotTableRequest.ttl: object expected"); - message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.cluster = ""; - object.snapshotId = ""; - object.ttl = null; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = message.cluster; - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) - object.snapshotId = message.snapshotId; - if (message.ttl != null && message.hasOwnProperty("ttl")) - object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); - if (message.description != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.GetSnapshotRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.ListSnapshotsRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.snapshots != null && message.hasOwnProperty("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]); - if (error) - return "snapshots." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListSnapshotsResponse) - return object; - 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 (typeof object.snapshots[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListSnapshotsResponse.snapshots: object expected"); - message.snapshots[i] = $root.google.bigtable.admin.v2.Snapshot.fromObject(object.snapshots[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.nextPageToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.DeleteSnapshotRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.SnapshotTableRequest.verify(message.originalRequest); - if (error) - return "originalRequest." + error; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.SnapshotTableMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.SnapshotTableMetadata(); - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.fromObject(object.originalRequest); - } - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalRequest = null; - object.requestTime = null; - object.finishTime = null; - } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.verify(message.originalRequest); - if (error) - return "originalRequest." + error; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata(); - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.fromObject(object.originalRequest); - } - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalRequest = null; - object.requestTime = null; - object.finishTime = null; - } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.bigtable.admin.v2.Backup.verify(message.backup); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateBackupRequest) - return object; - 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 (typeof object.backup !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateBackupRequest.backup: object expected"); - message.backup = $root.google.bigtable.admin.v2.Backup.fromObject(object.backup); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupId = ""; - object.backup = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - if (!$util.isString(message.sourceTable)) - return "sourceTable: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateBackupMetadata) - return object; - 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 (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.sourceTable = ""; - object.startTime = null; - object.endTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - object.sourceTable = message.sourceTable; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.backup = $root.google.bigtable.admin.v2.Backup.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.bigtable.admin.v2.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an 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) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateBackupRequest) - return object; - var message = new $root.google.bigtable.admin.v2.UpdateBackupRequest(); - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest.backup: object expected"); - message.backup = $root.google.bigtable.admin.v2.Backup.fromObject(object.backup); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backup = null; - object.updateMask = null; - } - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.GetBackupRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.DeleteBackupRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListBackupsRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.orderBy = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backups != null && message.hasOwnProperty("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]); - if (error) - return "backups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListBackupsResponse) - return object; - 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 (typeof object.backups[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.bigtable.admin.v2.Backup.fromObject(object.backups[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.nextPageToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) - if (!$util.isString(message.sourceBackup)) - return "sourceBackup: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.CopyBackupRequest) - return object; - 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 (typeof object.expireTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CopyBackupRequest.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupId = ""; - object.sourceBackup = ""; - object.expireTime = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) - object.sourceBackup = message.sourceBackup; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.sourceBackupInfo != null && Object.hasOwnProperty.call(message, "sourceBackupInfo")) - $root.google.bigtable.admin.v2.BackupInfo.encode(message.sourceBackupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32()); - break; - } - case 3: { - message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.sourceBackupInfo != null && message.hasOwnProperty("sourceBackupInfo")) { - var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.sourceBackupInfo); - if (error) - return "sourceBackupInfo." + error; - } - if (message.progress != null && message.hasOwnProperty("progress")) { - var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CopyBackupMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.CopyBackupMetadata(); - if (object.name != null) - message.name = String(object.name); - if (object.sourceBackupInfo != null) { - if (typeof object.sourceBackupInfo !== "object") - throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata.sourceBackupInfo: object expected"); - message.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.sourceBackupInfo); - } - if (object.progress != null) { - if (typeof object.progress !== "object") - throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata.progress: object expected"); - message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.sourceBackupInfo = null; - object.progress = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sourceBackupInfo != null && message.hasOwnProperty("sourceBackupInfo")) - object.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.sourceBackupInfo, options); - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.authorizedViewId != null && message.hasOwnProperty("authorizedViewId")) - if (!$util.isString(message.authorizedViewId)) - return "authorizedViewId: string expected"; - if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) { - var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest) - return object; - 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 (typeof object.authorizedView !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewRequest.authorizedView: object expected"); - message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.authorizedViewId = ""; - object.authorizedView = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.authorizedViewId != null && message.hasOwnProperty("authorizedViewId")) - object.authorizedViewId = message.authorizedViewId; - if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) - object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify(message.originalRequest); - if (error) - return "originalRequest." + error; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata(); - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.fromObject(object.originalRequest); - } - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalRequest = null; - object.requestTime = null; - object.finishTime = null; - } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - 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) { - if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest) - return object; - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authorizedViews != null && message.hasOwnProperty("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]); - if (error) - return "authorizedViews." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse) - return object; - 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 (typeof object.authorizedViews[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse.authorizedViews: object expected"); - message.authorizedViews[i] = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedViews[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.nextPageToken != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - case 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) { - if (object instanceof $root.google.bigtable.admin.v2.GetAuthorizedViewRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "RESPONSE_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.ignoreWarnings = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) { - var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView); - if (error) - return "authorizedView." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.ignoreWarnings != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest) - return object; - var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(); - if (object.authorizedView != null) { - if (typeof object.authorizedView !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.authorizedView: object expected"); - message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authorizedView = null; - object.updateMask = null; - object.ignoreWarnings = false; - } - if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) - object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { - var error = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify(message.originalRequest); - if (error) - return "originalRequest." + error; - } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) - return object; - var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata(); - if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.originalRequest: object expected"); - message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.fromObject(object.originalRequest); - } - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalRequest = null; - object.requestTime = null; - object.finishTime = null; - } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this 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.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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.sourceType = reader.int32(); - break; - } - case 2: { - message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - switch (message.sourceType) { - default: - return "sourceType: enum value expected"; - case 0: - case 1: - break; - } - if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { - properties.sourceInfo = 1; - { - var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.RestoreInfo) - return object; - 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 (typeof object.backupInfo !== "object") - throw TypeError(".google.bigtable.admin.v2.RestoreInfo.backupInfo: object expected"); - message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sourceType = options.enums === String ? "RESTORE_SOURCE_TYPE_UNSPECIFIED" : 0; - if (message.sourceType != null && message.hasOwnProperty("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 && message.hasOwnProperty("backupInfo")) { - object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options); - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ChangeStreamConfig retentionPeriod. - * @member {google.protobuf.IDuration|null|undefined} retentionPeriod - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @instance - */ - ChangeStreamConfig.prototype.retentionPeriod = null; - - /** - * Creates a new ChangeStreamConfig instance using the specified properties. - * @function create - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {google.bigtable.admin.v2.IChangeStreamConfig=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig instance - */ - ChangeStreamConfig.create = function create(properties) { - return new ChangeStreamConfig(properties); - }; - - /** - * Encodes the specified ChangeStreamConfig message. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. - * @function encode - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeStreamConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) - $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ChangeStreamConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeStreamConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ChangeStreamConfig message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeStreamConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ChangeStreamConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeStreamConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ChangeStreamConfig message. - * @function verify - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChangeStreamConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.retentionPeriod); - if (error) - return "retentionPeriod." + error; - } - return null; - }; - - /** - * Creates a ChangeStreamConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig - */ - ChangeStreamConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.ChangeStreamConfig) - return object; - var message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); - if (object.retentionPeriod != null) { - if (typeof object.retentionPeriod !== "object") - throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig.retentionPeriod: object expected"); - message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod); - } - return message; - }; - - /** - * Creates a plain object from a ChangeStreamConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {google.bigtable.admin.v2.ChangeStreamConfig} message ChangeStreamConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChangeStreamConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.retentionPeriod = null; - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) - object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); - return object; - }; - - /** - * Converts this ChangeStreamConfig to JSON. - * @function toJSON - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @instance - * @returns {Object.} JSON object - */ - ChangeStreamConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ChangeStreamConfig - * @function getTypeUrl - * @memberof google.bigtable.admin.v2.ChangeStreamConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ChangeStreamConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.bigtable.admin.v2.ChangeStreamConfig"; - }; - - return ChangeStreamConfig; - })(); - - v2.Table = (function() { - - /** - * 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 - */ - - /** - * 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) - 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; - - // 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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()).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()).ldelim(); - if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) - $root.google.bigtable.admin.v2.ChangeStreamConfig.encode(message.changeStreamConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.deletionProtection); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - 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()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - 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()); - break; - } - case 8: { - message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.deletionProtection = reader.bool(); - break; - } - case 13: { - message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.clusterStates != null && message.hasOwnProperty("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]]); - if (error) - return "clusterStates." + error; - } - } - if (message.columnFamilies != null && message.hasOwnProperty("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]]); - if (error) - return "columnFamilies." + error; - } - } - if (message.granularity != null && message.hasOwnProperty("granularity")) - switch (message.granularity) { - default: - return "granularity: enum value expected"; - case 0: - case 1: - break; - } - if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) { - var error = $root.google.bigtable.admin.v2.RestoreInfo.verify(message.restoreInfo); - if (error) - return "restoreInfo." + error; - } - if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) { - var error = $root.google.bigtable.admin.v2.ChangeStreamConfig.verify(message.changeStreamConfig); - if (error) - return "changeStreamConfig." + error; - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) - if (typeof message.deletionProtection !== "boolean") - return "deletionProtection: boolean expected"; - if (message.automatedBackupPolicy != null && message.hasOwnProperty("automatedBackupPolicy")) { - properties.automatedBackupConfig = 1; - { - var error = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify(message.automatedBackupPolicy); - if (error) - return "automatedBackupPolicy." + 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) { - if (object instanceof $root.google.bigtable.admin.v2.Table) - return object; - var message = new $root.google.bigtable.admin.v2.Table(); - if (object.name != null) - message.name = String(object.name); - if (object.clusterStates) { - if (typeof object.clusterStates !== "object") - 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 (typeof object.clusterStates[keys[i]] !== "object") - 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]]); - } - } - if (object.columnFamilies) { - if (typeof object.columnFamilies !== "object") - 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 (typeof object.columnFamilies[keys[i]] !== "object") - 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]]); - } - } - 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 (typeof object.restoreInfo !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.restoreInfo: object expected"); - message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.fromObject(object.restoreInfo); - } - if (object.changeStreamConfig != null) { - if (typeof object.changeStreamConfig !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.changeStreamConfig: object expected"); - message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.fromObject(object.changeStreamConfig); - } - if (object.deletionProtection != null) - message.deletionProtection = Boolean(object.deletionProtection); - if (object.automatedBackupPolicy != null) { - if (typeof object.automatedBackupPolicy !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.automatedBackupPolicy: object expected"); - message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.fromObject(object.automatedBackupPolicy); - } - 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) { - if (!options) - options = {}; - 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; - } - if (message.name != null && message.hasOwnProperty("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) - object.clusterStates[keys2[j]] = $root.google.bigtable.admin.v2.Table.ClusterState.toObject(message.clusterStates[keys2[j]], options); - } - if (message.columnFamilies && (keys2 = Object.keys(message.columnFamilies)).length) { - object.columnFamilies = {}; - for (var j = 0; j < keys2.length; ++j) - object.columnFamilies[keys2[j]] = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.columnFamilies[keys2[j]], options); - } - if (message.granularity != null && message.hasOwnProperty("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 && message.hasOwnProperty("restoreInfo")) - object.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.toObject(message.restoreInfo, options); - if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) - object.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.toObject(message.changeStreamConfig, options); - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) - object.deletionProtection = message.deletionProtection; - if (message.automatedBackupPolicy != null && message.hasOwnProperty("automatedBackupPolicy")) { - object.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.toObject(message.automatedBackupPolicy, options); - if (options.oneofs) - object.automatedBackupConfig = "automatedBackupPolicy"; - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.replicationState != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Table.ClusterState) - return object; - 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 (typeof object.encryptionInfo[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: object expected"); - message.encryptionInfo[i] = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo[i]); - } - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("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); - } - 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 - */ - - /** - * 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) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) - $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - $root.google.protobuf.Duration.encode(message.frequency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.frequency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.retentionPeriod); - if (error) - return "retentionPeriod." + error; - } - if (message.frequency != null && message.hasOwnProperty("frequency")) { - var error = $root.google.protobuf.Duration.verify(message.frequency); - if (error) - return "frequency." + error; - } - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy) - return object; - var message = new $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy(); - if (object.retentionPeriod != null) { - if (typeof object.retentionPeriod !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.retentionPeriod: object expected"); - message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod); - } - if (object.frequency != null) { - if (typeof object.frequency !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.frequency: object expected"); - message.frequency = $root.google.protobuf.Duration.fromObject(object.frequency); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.retentionPeriod = null; - object.frequency = null; - } - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) - object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = $root.google.protobuf.Duration.toObject(message.frequency, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 3: { - message.etag = reader.string(); - break; - } - case 4: { - message.deletionProtection = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.subsetView != null && message.hasOwnProperty("subsetView")) { - properties.authorizedView = 1; - { - var error = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.verify(message.subsetView); - if (error) - return "subsetView." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.deletionProtection != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView) - return object; - var message = new $root.google.bigtable.admin.v2.AuthorizedView(); - if (object.name != null) - message.name = String(object.name); - if (object.subsetView != null) { - if (typeof object.subsetView !== "object") - throw TypeError(".google.bigtable.admin.v2.AuthorizedView.subsetView: object expected"); - message.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.fromObject(object.subsetView); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - object.deletionProtection = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.subsetView != null && message.hasOwnProperty("subsetView")) { - object.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.toObject(message.subsetView, options); - if (options.oneofs) - object.authorizedView = "subsetView"; - } - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.deletionProtection != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.qualifiers != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets) - return object; - 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) { - if (!options) - options = {}; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.familySubsets[key] = value; - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowPrefixes != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]]); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.SubsetView) - return object; - 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 (typeof object.familySubsets !== "object") - 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 (typeof object.familySubsets[keys[i]] !== "object") - 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]]); - } - } - 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) { - if (!options) - options = {}; - 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) - object.familySubsets[keys2[j]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.toObject(message.familySubsets[keys2[j]], options); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.gcRule = $root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32()); - break; - } - case 3: { - message.valueType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcRule != null && message.hasOwnProperty("gcRule")) { - var error = $root.google.bigtable.admin.v2.GcRule.verify(message.gcRule); - if (error) - return "gcRule." + error; - } - if (message.valueType != null && message.hasOwnProperty("valueType")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.ColumnFamily) - return object; - var message = new $root.google.bigtable.admin.v2.ColumnFamily(); - if (object.gcRule != null) { - if (typeof object.gcRule !== "object") - throw TypeError(".google.bigtable.admin.v2.ColumnFamily.gcRule: object expected"); - message.gcRule = $root.google.bigtable.admin.v2.GcRule.fromObject(object.gcRule); - } - if (object.valueType != null) { - if (typeof object.valueType !== "object") - throw TypeError(".google.bigtable.admin.v2.ColumnFamily.valueType: object expected"); - message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcRule = null; - object.valueType = null; - } - if (message.gcRule != null && message.hasOwnProperty("gcRule")) - object.gcRule = $root.google.bigtable.admin.v2.GcRule.toObject(message.gcRule, options); - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.maxNumVersions = reader.int32(); - break; - } - case 2: { - message.maxAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.decode(reader, reader.uint32()); - break; - } - case 4: { - message.union = $root.google.bigtable.admin.v2.GcRule.Union.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { - properties.rule = 1; - if (!$util.isInteger(message.maxNumVersions)) - return "maxNumVersions: integer expected"; - } - if (message.maxAge != null && message.hasOwnProperty("maxAge")) { - if (properties.rule === 1) - return "rule: multiple values"; - properties.rule = 1; - { - var error = $root.google.protobuf.Duration.verify(message.maxAge); - if (error) - return "maxAge." + error; - } - } - if (message.intersection != null && message.hasOwnProperty("intersection")) { - if (properties.rule === 1) - return "rule: multiple values"; - properties.rule = 1; - { - var error = $root.google.bigtable.admin.v2.GcRule.Intersection.verify(message.intersection); - if (error) - return "intersection." + error; - } - } - if (message.union != null && message.hasOwnProperty("union")) { - if (properties.rule === 1) - return "rule: multiple values"; - properties.rule = 1; - { - var error = $root.google.bigtable.admin.v2.GcRule.Union.verify(message.union); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.GcRule) - return object; - var message = new $root.google.bigtable.admin.v2.GcRule(); - if (object.maxNumVersions != null) - message.maxNumVersions = object.maxNumVersions | 0; - if (object.maxAge != null) { - if (typeof object.maxAge !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.maxAge: object expected"); - message.maxAge = $root.google.protobuf.Duration.fromObject(object.maxAge); - } - if (object.intersection != null) { - if (typeof object.intersection !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.intersection: object expected"); - message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.fromObject(object.intersection); - } - if (object.union != null) { - if (typeof object.union !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.union: object expected"); - message.union = $root.google.bigtable.admin.v2.GcRule.Union.fromObject(object.union); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { - object.maxNumVersions = message.maxNumVersions; - if (options.oneofs) - object.rule = "maxNumVersions"; - } - if (message.maxAge != null && message.hasOwnProperty("maxAge")) { - object.maxAge = $root.google.protobuf.Duration.toObject(message.maxAge, options); - if (options.oneofs) - object.rule = "maxAge"; - } - if (message.intersection != null && message.hasOwnProperty("intersection")) { - object.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.toObject(message.intersection, options); - if (options.oneofs) - object.rule = "intersection"; - } - if (message.union != null && message.hasOwnProperty("union")) { - object.union = $root.google.bigtable.admin.v2.GcRule.Union.toObject(message.union, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.bigtable.admin.v2.GcRule.verify(message.rules[i]); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.GcRule.Intersection) - return object; - 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 (typeof object.rules[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: object expected"); - message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.bigtable.admin.v2.GcRule.verify(message.rules[i]); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.GcRule.Union) - return object; - 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 (typeof object.rules[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: object expected"); - message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 3: { - message.encryptionType = reader.int32(); - break; - } - case 4: { - message.encryptionStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 2: { - message.kmsKeyVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) - switch (message.encryptionType) { - default: - return "encryptionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) { - var error = $root.google.rpc.Status.verify(message.encryptionStatus); - if (error) - return "encryptionStatus." + error; - } - if (message.kmsKeyVersion != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.EncryptionInfo) - return object; - 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 (typeof object.encryptionStatus !== "object") - throw TypeError(".google.bigtable.admin.v2.EncryptionInfo.encryptionStatus: object expected"); - message.encryptionStatus = $root.google.rpc.Status.fromObject(object.encryptionStatus); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kmsKeyVersion = ""; - object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; - object.encryptionStatus = null; - } - if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) - object.kmsKeyVersion = message.kmsKeyVersion; - if (message.encryptionType != null && message.hasOwnProperty("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 && message.hasOwnProperty("encryptionStatus")) - object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) - $root.google.bigtable.admin.v2.Table.encode(message.sourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.sourceTable = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32()); - break; - } - case 3: { - message.dataSizeBytes = reader.int64(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) { - var error = $root.google.bigtable.admin.v2.Table.verify(message.sourceTable); - if (error) - return "sourceTable." + error; - } - if (message.dataSizeBytes != null && message.hasOwnProperty("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 && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); - if (error) - return "deleteTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.description != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.Snapshot) - return object; - var message = new $root.google.bigtable.admin.v2.Snapshot(); - if (object.name != null) - message.name = String(object.name); - if (object.sourceTable != null) { - if (typeof object.sourceTable !== "object") - throw TypeError(".google.bigtable.admin.v2.Snapshot.sourceTable: object expected"); - message.sourceTable = $root.google.bigtable.admin.v2.Table.fromObject(object.sourceTable); - } - if (object.dataSizeBytes != null) - if ($util.Long) - (message.dataSizeBytes = $util.Long.fromValue(object.dataSizeBytes)).unsigned = 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 (typeof object.createTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Snapshot.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Snapshot.deleteTime: object expected"); - message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); - } - 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) { - if (!options) - options = {}; - 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() : long; - } else - object.dataSizeBytes = options.longs === String ? "0" : 0; - object.createTime = null; - object.deleteTime = null; - object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - object.sourceTable = $root.google.bigtable.admin.v2.Table.toObject(message.sourceTable, options); - if (message.dataSizeBytes != null && message.hasOwnProperty("dataSizeBytes")) - 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 && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.state != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - case 4: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - 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()); - break; - } - case 11: { - message.backupType = reader.int32(); - break; - } - case 12: { - message.hotToStandardTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - if (!$util.isString(message.sourceTable)) - return "sourceTable: string expected"; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) - if (!$util.isString(message.sourceBackup)) - return "sourceBackup: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.sizeBytes != null && message.hasOwnProperty("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 && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { - var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo); - if (error) - return "encryptionInfo." + error; - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - switch (message.backupType) { - default: - return "backupType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.hotToStandardTime != null && message.hasOwnProperty("hotToStandardTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.hotToStandardTime); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Backup) - return object; - 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 (typeof object.expireTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.sizeBytes != null) - if ($util.Long) - (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = 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 (typeof object.encryptionInfo !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); - message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo); - } - 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 (typeof object.hotToStandardTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.hotToStandardTime: object expected"); - message.hotToStandardTime = $root.google.protobuf.Timestamp.fromObject(object.hotToStandardTime); - } - 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) { - if (!options) - options = {}; - 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() : long; - } else - object.sizeBytes = options.longs === String ? "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 && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - object.sourceTable = message.sourceTable; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - 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 && message.hasOwnProperty("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 && message.hasOwnProperty("encryptionInfo")) - object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options); - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) - object.sourceBackup = message.sourceBackup; - if (message.backupType != null && message.hasOwnProperty("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 && message.hasOwnProperty("hotToStandardTime")) - object.hotToStandardTime = $root.google.protobuf.Timestamp.toObject(message.hotToStandardTime, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.backup = reader.string(); - break; - } - case 2: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sourceTable = reader.string(); - break; - } - case 10: { - message.sourceBackup = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - if (!$util.isString(message.sourceTable)) - return "sourceTable: string expected"; - if (message.sourceBackup != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.admin.v2.BackupInfo) - return object; - var message = new $root.google.bigtable.admin.v2.BackupInfo(); - if (object.backup != null) - message.backup = String(object.backup); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.BackupInfo.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.BackupInfo.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backup = ""; - object.startTime = null; - object.endTime = null; - object.sourceTable = ""; - object.sourceBackup = ""; - } - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - object.sourceTable = message.sourceTable; - if (message.sourceBackup != null && message.hasOwnProperty("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.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 - */ - - /** - * 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) - 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; - - // 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"|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"]), - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stringType = $root.google.bigtable.admin.v2.Type.String.decode(reader, reader.uint32()); - break; - } - case 5: { - message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.decode(reader, reader.uint32()); - break; - } - case 12: { - message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.decode(reader, reader.uint32()); - break; - } - case 9: { - message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.decode(reader, reader.uint32()); - break; - } - case 8: { - message.boolType = $root.google.bigtable.admin.v2.Type.Bool.decode(reader, reader.uint32()); - break; - } - case 10: { - message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.dateType = $root.google.bigtable.admin.v2.Type.Date.decode(reader, reader.uint32()); - break; - } - case 6: { - message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.decode(reader, reader.uint32()); - break; - } - case 7: { - message.structType = $root.google.bigtable.admin.v2.Type.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.arrayType = $root.google.bigtable.admin.v2.Type.Array.decode(reader, reader.uint32()); - break; - } - case 4: { - message.mapType = $root.google.bigtable.admin.v2.Type.Map.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType); - if (error) - return "bytesType." + error; - } - } - if (message.stringType != null && message.hasOwnProperty("stringType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.String.verify(message.stringType); - if (error) - return "stringType." + error; - } - } - if (message.int64Type != null && message.hasOwnProperty("int64Type")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Int64.verify(message.int64Type); - if (error) - return "int64Type." + error; - } - } - if (message.float32Type != null && message.hasOwnProperty("float32Type")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Float32.verify(message.float32Type); - if (error) - return "float32Type." + error; - } - } - if (message.float64Type != null && message.hasOwnProperty("float64Type")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Float64.verify(message.float64Type); - if (error) - return "float64Type." + error; - } - } - if (message.boolType != null && message.hasOwnProperty("boolType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Bool.verify(message.boolType); - if (error) - return "boolType." + error; - } - } - if (message.timestampType != null && message.hasOwnProperty("timestampType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Timestamp.verify(message.timestampType); - if (error) - return "timestampType." + error; - } - } - if (message.dateType != null && message.hasOwnProperty("dateType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Date.verify(message.dateType); - if (error) - return "dateType." + error; - } - } - if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Aggregate.verify(message.aggregateType); - if (error) - return "aggregateType." + error; - } - } - if (message.structType != null && message.hasOwnProperty("structType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Struct.verify(message.structType); - if (error) - return "structType." + error; - } - } - if (message.arrayType != null && message.hasOwnProperty("arrayType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Array.verify(message.arrayType); - if (error) - return "arrayType." + error; - } - } - if (message.mapType != null && message.hasOwnProperty("mapType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Map.verify(message.mapType); - if (error) - return "mapType." + 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type) - return object; - var message = new $root.google.bigtable.admin.v2.Type(); - if (object.bytesType != null) { - if (typeof object.bytesType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.bytesType: object expected"); - message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.fromObject(object.bytesType); - } - if (object.stringType != null) { - if (typeof object.stringType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.stringType: object expected"); - message.stringType = $root.google.bigtable.admin.v2.Type.String.fromObject(object.stringType); - } - if (object.int64Type != null) { - if (typeof object.int64Type !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.int64Type: object expected"); - message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.fromObject(object.int64Type); - } - if (object.float32Type != null) { - if (typeof object.float32Type !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.float32Type: object expected"); - message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.fromObject(object.float32Type); - } - if (object.float64Type != null) { - if (typeof object.float64Type !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.float64Type: object expected"); - message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.fromObject(object.float64Type); - } - if (object.boolType != null) { - if (typeof object.boolType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.boolType: object expected"); - message.boolType = $root.google.bigtable.admin.v2.Type.Bool.fromObject(object.boolType); - } - if (object.timestampType != null) { - if (typeof object.timestampType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.timestampType: object expected"); - message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.fromObject(object.timestampType); - } - if (object.dateType != null) { - if (typeof object.dateType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.dateType: object expected"); - message.dateType = $root.google.bigtable.admin.v2.Type.Date.fromObject(object.dateType); - } - if (object.aggregateType != null) { - if (typeof object.aggregateType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.aggregateType: object expected"); - message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.fromObject(object.aggregateType); - } - if (object.structType != null) { - if (typeof object.structType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.structType: object expected"); - message.structType = $root.google.bigtable.admin.v2.Type.Struct.fromObject(object.structType); - } - if (object.arrayType != null) { - if (typeof object.arrayType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.arrayType: object expected"); - message.arrayType = $root.google.bigtable.admin.v2.Type.Array.fromObject(object.arrayType); - } - if (object.mapType != null) { - if (typeof object.mapType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.mapType: object expected"); - message.mapType = $root.google.bigtable.admin.v2.Type.Map.fromObject(object.mapType); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { - object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options); - if (options.oneofs) - object.kind = "bytesType"; - } - if (message.stringType != null && message.hasOwnProperty("stringType")) { - object.stringType = $root.google.bigtable.admin.v2.Type.String.toObject(message.stringType, options); - if (options.oneofs) - object.kind = "stringType"; - } - if (message.arrayType != null && message.hasOwnProperty("arrayType")) { - object.arrayType = $root.google.bigtable.admin.v2.Type.Array.toObject(message.arrayType, options); - if (options.oneofs) - object.kind = "arrayType"; - } - if (message.mapType != null && message.hasOwnProperty("mapType")) { - object.mapType = $root.google.bigtable.admin.v2.Type.Map.toObject(message.mapType, options); - if (options.oneofs) - object.kind = "mapType"; - } - if (message.int64Type != null && message.hasOwnProperty("int64Type")) { - object.int64Type = $root.google.bigtable.admin.v2.Type.Int64.toObject(message.int64Type, options); - if (options.oneofs) - object.kind = "int64Type"; - } - if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { - object.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.toObject(message.aggregateType, options); - if (options.oneofs) - object.kind = "aggregateType"; - } - if (message.structType != null && message.hasOwnProperty("structType")) { - object.structType = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.structType, options); - if (options.oneofs) - object.kind = "structType"; - } - if (message.boolType != null && message.hasOwnProperty("boolType")) { - object.boolType = $root.google.bigtable.admin.v2.Type.Bool.toObject(message.boolType, options); - if (options.oneofs) - object.kind = "boolType"; - } - if (message.float64Type != null && message.hasOwnProperty("float64Type")) { - object.float64Type = $root.google.bigtable.admin.v2.Type.Float64.toObject(message.float64Type, options); - if (options.oneofs) - object.kind = "float64Type"; - } - if (message.timestampType != null && message.hasOwnProperty("timestampType")) { - object.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.toObject(message.timestampType, options); - if (options.oneofs) - object.kind = "timestampType"; - } - if (message.dateType != null && message.hasOwnProperty("dateType")) { - object.dateType = $root.google.bigtable.admin.v2.Type.Date.toObject(message.dateType, options); - if (options.oneofs) - object.kind = "dateType"; - } - if (message.float32Type != null && message.hasOwnProperty("float32Type")) { - object.float32Type = $root.google.bigtable.admin.v2.Type.Float32.toObject(message.float32Type, options); - if (options.oneofs) - object.kind = "float32Type"; - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { - var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.verify(message.encoding); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes) - return object; - var message = new $root.google.bigtable.admin.v2.Type.Bytes(); - if (object.encoding != null) { - if (typeof object.encoding !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Bytes.encoding: object expected"); - message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.fromObject(object.encoding); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.toObject(message.encoding, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.raw != null && message.hasOwnProperty("raw")) { - properties.encoding = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify(message.raw); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes.Encoding) - return object; - var message = new $root.google.bigtable.admin.v2.Type.Bytes.Encoding(); - if (object.raw != null) { - if (typeof object.raw !== "object") - 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); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.raw != null && message.hasOwnProperty("raw")) { - object.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { - var error = $root.google.bigtable.admin.v2.Type.String.Encoding.verify(message.encoding); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.String) - return object; - var message = new $root.google.bigtable.admin.v2.Type.String(); - if (object.encoding != null) { - if (typeof object.encoding !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.String.encoding: object expected"); - message.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.fromObject(object.encoding); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.toObject(message.encoding, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.decode(reader, reader.uint32()); - break; - } - case 2: { - message.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { - properties.encoding = 1; - { - var error = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw); - if (error) - return "utf8Raw." + error; - } - } - if (message.utf8Bytes != null && message.hasOwnProperty("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); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.String.Encoding) - return object; - var message = new $root.google.bigtable.admin.v2.Type.String.Encoding(); - if (object.utf8Raw != null) { - if (typeof object.utf8Raw !== "object") - 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); - } - if (object.utf8Bytes != null) { - if (typeof object.utf8Bytes !== "object") - 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); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { - object.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options); - if (options.oneofs) - object.encoding = "utf8Raw"; - } - if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { - object.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { - var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.verify(message.encoding); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Int64) - return object; - var message = new $root.google.bigtable.admin.v2.Type.Int64(); - if (object.encoding != null) { - if (typeof object.encoding !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Int64.encoding: object expected"); - message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.fromObject(object.encoding); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.encoding, options); - 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 - */ - - /** - * 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) - 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; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Encoding encoding. - * @member {"bigEndianBytes"|undefined} encoding - * @memberof google.bigtable.admin.v2.Type.Int64.Encoding - * @instance - */ - Object.defineProperty(Encoding.prototype, "encoding", { - get: $util.oneOfGetter($oneOfFields = ["bigEndianBytes"]), - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { - properties.encoding = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes); - if (error) - return "bigEndianBytes." + 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding) - return object; - var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding(); - if (object.bigEndianBytes != null) { - if (typeof object.bigEndianBytes !== "object") - 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); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { - object.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options); - if (options.oneofs) - object.encoding = "bigEndianBytes"; - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { - var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) - return object; - var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(); - if (object.bytesType != null) { - if (typeof object.bytesType !== "object") - 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); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bytesType = null; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) - object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options); - 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; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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 - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Timestamp) - return object; - return new $root.google.bigtable.admin.v2.Type.Timestamp(); - }; - - /** - * 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() { - return {}; - }; - - /** - * 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"; - }; - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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 - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Array.} fields - * @memberof google.bigtable.admin.v2.Type.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyArray; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.bigtable.admin.v2.Type.Struct.Field.verify(message.fields[i]); - if (error) - return "fields." + 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Struct) - return object; - 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 (typeof object.fields[i] !== "object") - 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]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.bigtable.admin.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 2: { - message.type = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.type); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Field) - return object; - 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 (typeof object.type !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Struct.Field.type: object expected"); - message.type = $root.google.bigtable.admin.v2.Type.fromObject(object.type); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldName = ""; - object.type = null; - } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.bigtable.admin.v2.Type.toObject(message.type, options); - 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; - })(); - - return Struct; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.elementType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.elementType != null && message.hasOwnProperty("elementType")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.elementType); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Array) - return object; - var message = new $root.google.bigtable.admin.v2.Type.Array(); - if (object.elementType != null) { - if (typeof object.elementType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Array.elementType: object expected"); - message.elementType = $root.google.bigtable.admin.v2.Type.fromObject(object.elementType); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.elementType = null; - if (message.elementType != null && message.hasOwnProperty("elementType")) - object.elementType = $root.google.bigtable.admin.v2.Type.toObject(message.elementType, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.keyType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - case 2: { - message.valueType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.keyType); - if (error) - return "keyType." + error; - } - if (message.valueType != null && message.hasOwnProperty("valueType")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Map) - return object; - var message = new $root.google.bigtable.admin.v2.Type.Map(); - if (object.keyType != null) { - if (typeof object.keyType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Map.keyType: object expected"); - message.keyType = $root.google.bigtable.admin.v2.Type.fromObject(object.keyType); - } - if (object.valueType != null) { - if (typeof object.valueType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Map.valueType: object expected"); - message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyType = null; - object.valueType = null; - } - if (message.keyType != null && message.hasOwnProperty("keyType")) - object.keyType = $root.google.bigtable.admin.v2.Type.toObject(message.keyType, options); - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.inputType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stateType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.decode(reader, reader.uint32()); - break; - } - case 5: { - message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.decode(reader, reader.uint32()); - break; - } - case 6: { - message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.decode(reader, reader.uint32()); - break; - } - case 7: { - message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.inputType != null && message.hasOwnProperty("inputType")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.inputType); - if (error) - return "inputType." + error; - } - if (message.stateType != null && message.hasOwnProperty("stateType")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.stateType); - if (error) - return "stateType." + error; - } - if (message.sum != null && message.hasOwnProperty("sum")) { - properties.aggregator = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.verify(message.sum); - if (error) - return "sum." + error; - } - } - if (message.hllppUniqueCount != null && message.hasOwnProperty("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); - if (error) - return "hllppUniqueCount." + error; - } - } - if (message.max != null && message.hasOwnProperty("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); - if (error) - return "max." + error; - } - } - if (message.min != null && message.hasOwnProperty("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); - 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate) - return object; - var message = new $root.google.bigtable.admin.v2.Type.Aggregate(); - if (object.inputType != null) { - if (typeof object.inputType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.inputType: object expected"); - message.inputType = $root.google.bigtable.admin.v2.Type.fromObject(object.inputType); - } - if (object.stateType != null) { - if (typeof object.stateType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.stateType: object expected"); - message.stateType = $root.google.bigtable.admin.v2.Type.fromObject(object.stateType); - } - if (object.sum != null) { - if (typeof object.sum !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.sum: object expected"); - message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.fromObject(object.sum); - } - if (object.hllppUniqueCount != null) { - if (typeof object.hllppUniqueCount !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.hllppUniqueCount: object expected"); - message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount); - } - if (object.max != null) { - if (typeof object.max !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.max: object expected"); - message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.fromObject(object.max); - } - if (object.min != null) { - if (typeof object.min !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.min: object expected"); - message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.fromObject(object.min); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.inputType = null; - object.stateType = null; - } - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = $root.google.bigtable.admin.v2.Type.toObject(message.inputType, options); - if (message.stateType != null && message.hasOwnProperty("stateType")) - object.stateType = $root.google.bigtable.admin.v2.Type.toObject(message.stateType, options); - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.toObject(message.sum, options); - if (options.oneofs) - object.aggregator = "sum"; - } - if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { - object.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options); - if (options.oneofs) - object.aggregator = "hllppUniqueCount"; - } - if (message.max != null && message.hasOwnProperty("max")) { - object.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.toObject(message.max, options); - if (options.oneofs) - object.aggregator = "max"; - } - if (message.min != null && message.hasOwnProperty("min")) { - object.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.toObject(message.min, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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; - })(); - - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * 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) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - 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).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - 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 (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - 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); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - 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); - break; - } - } - 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); - break; - } - } - 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); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++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) - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - 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).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @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; - })(); - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN 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[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} [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.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - 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) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - 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_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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("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]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - 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 (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.verification != null && message.hasOwnProperty("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 && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_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 (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 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()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.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 (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions 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.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {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 {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) - 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 uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.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()).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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - 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()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 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())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.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 (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.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[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.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); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - 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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - 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_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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("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; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions 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 uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - 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).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - 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())); - 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); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".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) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".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.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions 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.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.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) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.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 - */ - - /** - * 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) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - 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) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - 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; - } - 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) { - if (!options) - options = {}; - 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; - } - if (message.fieldPresence != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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; - 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; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("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]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - 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 && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - 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) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - 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 (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - 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_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_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) { - if (!options) - options = {}; - 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); - } - if (message.minimumEdition != null && message.hasOwnProperty("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 && message.hasOwnProperty("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} [features] FeatureSetEditionDefault features - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = 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) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + 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) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - 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_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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("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 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - 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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { - var error = $root.google.iam.v1.Policy.verify(message.policy); - if (error) - return "policy." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.SetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.policy != null) { - if (typeof object.policy !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); - message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.policy = null; - object.updateMask = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); - 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) { - if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.GetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); - message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.options = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.permissions != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) - object.resource = ""; - if (message.resource != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.permissions != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) - return object; - 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) { - if (!options) - options = {}; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.requestedPolicyVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.iam.v1.GetPolicyOptions) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.requestedPolicyVersion = 0; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - case 6: { - if (!(message.auditConfigs && message.auditConfigs.length)) - message.auditConfigs = []; - message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); - break; - } - case 3: { - message.etag = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("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]); - if (error) - return "bindings." + error; - } - } - if (message.auditConfigs != null && message.hasOwnProperty("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]); - if (error) - return "auditConfigs." + error; - } - } - if (message.etag != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.iam.v1.Policy) - return object; - 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 (typeof object.bindings[i] !== "object") - throw TypeError(".google.iam.v1.Policy.bindings: object expected"); - message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); - } - } - 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 (typeof object.auditConfigs[i] !== "object") - throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); - message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); - } - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("version")) - object.version = message.version; - if (message.etag != null && message.hasOwnProperty("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); - } - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.members != null && message.hasOwnProperty("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 && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - 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) { - if (object instanceof $root.google.iam.v1.Binding) - return object; - 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 (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.members = []; - if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("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 && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.auditLogConfigs != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.iam.v1.AuditConfig) - return object; - 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 (typeof object.auditLogConfigs[i] !== "object") - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); - message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.auditLogConfigs = []; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - switch (message.logType) { - default: - return "logType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.exemptedMembers != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.iam.v1.AuditLogConfig) - return object; - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - case 2: { - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bindingDeltas != null && message.hasOwnProperty("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]); - if (error) - return "bindingDeltas." + error; - } - } - if (message.auditConfigDeltas != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.iam.v1.PolicyDelta) - return object; - 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 (typeof object.bindingDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); - message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); - } - } - 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 (typeof object.auditConfigDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); - message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - 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) { - if (object instanceof $root.google.iam.v1.BindingDelta) - return object; - 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 (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - object.condition = null; - } - if (message.action != null && message.hasOwnProperty("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 && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - if (!$util.isString(message.exemptedMember)) - return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.iam.v1.AuditConfigDelta) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.service = ""; - object.exemptedMember = ""; - object.logType = ""; - } - if (message.action != null && message.hasOwnProperty("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 && message.hasOwnProperty("service")) - object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.location != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.type.Expr) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.expression = ""; - object.title = ""; - object.description = ""; - object.location = ""; - } - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.location != null && message.hasOwnProperty("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; - })(); - - 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 this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an 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) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/admin/v2/protos/protos.json b/owl-bot-staging/admin/v2/protos/protos.json deleted file mode 100644 index 1fc3774d1..000000000 --- a/owl-bot-staging/admin/v2/protos/protos.json +++ /dev/null @@ -1,6161 +0,0 @@ -{ - "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" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=projects/*/instances/*/appProfiles/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "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.method_signature)": "resource" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{resource=projects/*/instances/*}: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.method_signature)": "resource,policy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{resource=projects/*/instances/*}: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.method_signature)": "resource,permissions" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{resource=projects/*/instances/*}: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" - } - ] - } - } - }, - "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 - } - } - }, - "Instance": { - "options": { - "(google.api.resource).type": "bigtableadmin.googleapis.com/Instance", - "(google.api.resource).pattern": "projects/{project}/instances/{instance}" - }, - "oneofs": { - "_satisfiesPzs": { - "oneof": [ - "satisfiesPzs" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 3 - }, - "type": { - "type": "Type", - "id": 4 - }, - "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 - } - } - }, - "nested": { - "State": { - "values": { - "STATE_NOT_KNOWN": 0, - "READY": 1, - "CREATING": 2 - } - }, - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "PRODUCTION": 1, - "DEVELOPMENT": 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}" - }, - "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 - }, - "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 - } - }, - "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}" - }, - "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": { - "fields": { - "clusterIds": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "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}" - }, - "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" - } - } - } - }, - "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/*/clusters/*/backups/*}: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": "*" - } - } - }, - { - "(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/*/clusters/*/backups/*}: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": "*" - } - } - }, - { - "(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/*/clusters/*/backups/*}: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": "*" - } - } - }, - { - "(google.api.method_signature)": "resource,permissions" - } - ] - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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 - } - }, - "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, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, - "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 - } - }, - "Type": { - "oneofs": { - "kind": { - "oneof": [ - "bytesType", - "stringType", - "int64Type", - "float32Type", - "float64Type", - "boolType", - "timestampType", - "dateType", - "aggregateType", - "structType", - "arrayType", - "mapType" - ] - } - }, - "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 - } - }, - "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" - ] - } - }, - "fields": { - "bigEndianBytes": { - "type": "BigEndianBytes", - "id": 1 - } - }, - "nested": { - "BigEndianBytes": { - "fields": { - "bytesType": { - "type": "Bytes", - "id": 1 - } - } - } - } - } - } - }, - "Bool": { - "fields": {} - }, - "Float32": { - "fields": {} - }, - "Float64": { - "fields": {} - }, - "Timestamp": { - "fields": {} - }, - "Date": { - "fields": {} - }, - "Struct": { - "fields": { - "fields": { - "rule": "repeated", - "type": "Field", - "id": 1 - } - }, - "nested": { - "Field": { - "fields": { - "fieldName": { - "type": "string", - "id": 1 - }, - "type": { - "type": "Type", - "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": {} - } - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "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 - } - } - }, - "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 - } - } - }, - "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 - } - } - }, - "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 - } - }, - "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 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "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": { - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "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 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "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": { - "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 - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "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 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "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": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "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": { - "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": { - "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": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 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 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "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 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "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": {} - } - } - }, - "iam": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "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" - }, - "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/expr;expr", - "java_multiple_files": true, - "java_outer_classname": "ExprProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Expr": { - "fields": { - "expression": { - "type": "string", - "id": 1 - }, - "title": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "location": { - "type": "string", - "id": 4 - } - } - } - } - }, - "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", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "options": { - "(google.api.default_host)": "longrunning.googleapis.com" - }, - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations}" - } - }, - { - "(google.api.method_signature)": "name,filter" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_app_profile.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_app_profile.js deleted file mode 100644 index d601d585c..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_app_profile.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_cluster.js deleted file mode 100644 index 1a1602bb9..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_cluster.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_instance.js deleted file mode 100644 index 9e9adbce9..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.create_instance.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. - * Currently, at most four clusters can be specified. - */ - // const clusters = [1,2,3,4] - - // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js deleted file mode 100644 index 20018edcc..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_cluster.js deleted file mode 100644 index 55ac73087..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_cluster.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_instance.js deleted file mode 100644 index 8c80885c8..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.delete_instance.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_app_profile.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_app_profile.js deleted file mode 100644 index 0e2b9c72b..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_app_profile.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_cluster.js deleted file mode 100644 index 2d5188b36..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_cluster.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js deleted file mode 100644 index 15ea1d6cd..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_instance.js deleted file mode 100644 index b5e947016..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.get_instance.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js deleted file mode 100644 index 409c049d6..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_clusters.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_clusters.js deleted file mode 100644 index 9df1ed7b3..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_clusters.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js deleted file mode 100644 index 73eb76242..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_instances.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_instances.js deleted file mode 100644 index f5ce2ba39..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.list_instances.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js deleted file mode 100644 index 1d7bfa098..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js deleted file mode 100644 index 3bb32a5d0..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js deleted file mode 100644 index acd627f01..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js deleted file mode 100644 index df5a650c8..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_app_profile.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_app_profile.js deleted file mode 100644 index 347e0cfbe..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_app_profile.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_cluster.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_cluster.js deleted file mode 100644 index abb3389e4..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_cluster.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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, 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 allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - */ - // const serveNodes = 1234 - /** - * 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').v2; - - // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); - - async function callUpdateCluster() { - // Construct request - const request = { - location, - state, - 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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_instance.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_instance.js deleted file mode 100644 index 4f14b246f..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_instance_admin.update_instance.js +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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, createTime, satisfiesPzs) { - // [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' - /** - * (`OutputOnly`) - * The current state of the instance. - */ - // const state = {} - /** - * The type of the instance. Defaults to `PRODUCTION`. - */ - // const type = {} - /** - * 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 server-assigned 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 - - // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); - - async function callUpdateInstance() { - // Construct request - const request = { - displayName, - createTime, - satisfiesPzs, - }; - - // 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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.check_consistency.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.check_consistency.js deleted file mode 100644 index e36b88599..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.check_consistency.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.copy_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.copy_backup.js deleted file mode 100644 index 61b173330..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.copy_backup.js +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_authorized_view.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_authorized_view.js deleted file mode 100644 index 7be88c26f..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_authorized_view.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_backup.js deleted file mode 100644 index 169ba6a0a..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_backup.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table.js deleted file mode 100644 index 91a4b1010..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table.js +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js deleted file mode 100644 index 00b4e9e0b..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js deleted file mode 100644 index 6e9976054..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_backup.js deleted file mode 100644 index 445972758..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_backup.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_snapshot.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_snapshot.js deleted file mode 100644 index c186cbbb3..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_snapshot.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_table.js deleted file mode 100644 index 115c0f650..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.delete_table.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.drop_row_range.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.drop_row_range.js deleted file mode 100644 index 2006e896e..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.drop_row_range.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js deleted file mode 100644 index 109c5a1d4..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_authorized_view.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_authorized_view.js deleted file mode 100644 index 6a6167f32..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_authorized_view.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_backup.js deleted file mode 100644 index 5968603e3..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_backup.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_iam_policy.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_iam_policy.js deleted file mode 100644 index 60ef6680f..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_snapshot.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_snapshot.js deleted file mode 100644 index 8fa21ae32..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_snapshot.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_table.js deleted file mode 100644 index 48ad667c3..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.get_table.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_authorized_views.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_authorized_views.js deleted file mode 100644 index 5cf0bfec3..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_authorized_views.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 views' fields. - * Default to NAME_ONLY. - */ - // const view = {} - - // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_backups.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_backups.js deleted file mode 100644 index 1a6c3f296..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_backups.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_snapshots.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_snapshots.js deleted file mode 100644 index 169a77cb2..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_snapshots.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_tables.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_tables.js deleted file mode 100644 index d50bbd024..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.list_tables.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.modify_column_families.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.modify_column_families.js deleted file mode 100644 index 6835f6bc5..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.modify_column_families.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.restore_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.restore_table.js deleted file mode 100644 index 86ab4d49a..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.restore_table.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.set_iam_policy.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.set_iam_policy.js deleted file mode 100644 index fc874dd9f..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.snapshot_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.snapshot_table.js deleted file mode 100644 index ce474124b..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.snapshot_table.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js deleted file mode 100644 index 6c49f13e3..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.undelete_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.undelete_table.js deleted file mode 100644 index 743cbb7dc..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.undelete_table.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_authorized_view.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_authorized_view.js deleted file mode 100644 index 405f9fb24..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_authorized_view.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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//instances//tables/
/authorizedViews/ - */ - // 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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_backup.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_backup.js deleted file mode 100644 index ea695ffbb..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_backup.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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').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/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_table.js b/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_table.js deleted file mode 100644 index 181a44e26..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/bigtable_table_admin.update_table.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - */ - // const updateMask = {} - - // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').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/owl-bot-staging/admin/v2/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json b/owl-bot-staging/admin/v2/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json deleted file mode 100644 index fbcdccc1e..000000000 --- a/owl-bot-staging/admin/v2/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json +++ /dev/null @@ -1,2395 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-admin", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.bigtable.admin.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async", - "title": "bigtable createInstance Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_instance_admin.create_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "instance_id", - "type": "TYPE_STRING" - }, - { - "name": "instance", - "type": ".google.bigtable.admin.v2.Instance" - }, - { - "name": "clusters", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async", - "title": "bigtable getInstance Sample", - "origin": "API_DEFINITION", - "description": " Gets information about an instance.", - "canonical": true, - "file": "bigtable_instance_admin.get_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Instance", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async", - "title": "bigtable listInstances Sample", - "origin": "API_DEFINITION", - "description": " Lists information about instances in a project.", - "canonical": true, - "file": "bigtable_instance_admin.list_instances.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListInstances", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListInstancesResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListInstances", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async", - "title": "bigtable updateInstance Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_instance_admin.update_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 94, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "display_name", - "type": "TYPE_STRING" - }, - { - "name": "state", - "type": ".google.bigtable.admin.v2.Instance.State" - }, - { - "name": "type", - "type": ".google.bigtable.admin.v2.Instance.Type" - }, - { - "name": "labels", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "create_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "satisfies_pzs", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.admin.v2.Instance", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async", - "title": "bigtable partialUpdateInstance Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_instance_admin.partial_update_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PartialUpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", - "async": true, - "parameters": [ - { - "name": "instance", - "type": ".google.bigtable.admin.v2.Instance" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "PartialUpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async", - "title": "bigtable deleteInstance Sample", - "origin": "API_DEFINITION", - "description": " Delete an instance from a project.", - "canonical": true, - "file": "bigtable_instance_admin.delete_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async", - "title": "bigtable createCluster Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_instance_admin.create_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "cluster", - "type": ".google.bigtable.admin.v2.Cluster" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async", - "title": "bigtable getCluster Sample", - "origin": "API_DEFINITION", - "description": " Gets information about a cluster.", - "canonical": true, - "file": "bigtable_instance_admin.get_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Cluster", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async", - "title": "bigtable listClusters Sample", - "origin": "API_DEFINITION", - "description": " Lists information about clusters in an instance.", - "canonical": true, - "file": "bigtable_instance_admin.list_clusters.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListClusters", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListClustersResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListClusters", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async", - "title": "bigtable updateCluster Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_instance_admin.update_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "location", - "type": "TYPE_STRING" - }, - { - "name": "state", - "type": ".google.bigtable.admin.v2.Cluster.State" - }, - { - "name": "serve_nodes", - "type": "TYPE_INT32" - }, - { - "name": "cluster_config", - "type": ".google.bigtable.admin.v2.Cluster.ClusterConfig" - }, - { - "name": "default_storage_type", - "type": ".google.bigtable.admin.v2.StorageType" - }, - { - "name": "encryption_config", - "type": ".google.bigtable.admin.v2.Cluster.EncryptionConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async", - "title": "bigtable partialUpdateCluster Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_instance_admin.partial_update_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PartialUpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", - "async": true, - "parameters": [ - { - "name": "cluster", - "type": ".google.bigtable.admin.v2.Cluster" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "PartialUpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async", - "title": "bigtable deleteCluster Sample", - "origin": "API_DEFINITION", - "description": " Deletes a cluster from an instance.", - "canonical": true, - "file": "bigtable_instance_admin.delete_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async", - "title": "bigtable createAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Creates an app profile within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.create_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "app_profile", - "type": ".google.bigtable.admin.v2.AppProfile" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.admin.v2.AppProfile", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async", - "title": "bigtable getAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Gets information about an app profile.", - "canonical": true, - "file": "bigtable_instance_admin.get_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.AppProfile", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async", - "title": "bigtable listAppProfiles Sample", - "origin": "API_DEFINITION", - "description": " Lists information about app profiles in an instance.", - "canonical": true, - "file": "bigtable_instance_admin.list_app_profiles.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAppProfiles", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListAppProfilesResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListAppProfiles", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async", - "title": "bigtable updateAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Updates an app profile within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.update_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", - "async": true, - "parameters": [ - { - "name": "app_profile", - "type": ".google.bigtable.admin.v2.AppProfile" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async", - "title": "bigtable deleteAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Deletes an app profile from an instance.", - "canonical": true, - "file": "bigtable_instance_admin.delete_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async", - "title": "bigtable getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.", - "canonical": true, - "file": "bigtable_instance_admin.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async", - "title": "bigtable setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy on an instance resource. Replaces any existing policy.", - "canonical": true, - "file": "bigtable_instance_admin.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async", - "title": "bigtable testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns permissions that the caller has on the specified instance resource.", - "canonical": true, - "file": "bigtable_instance_admin.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async", - "title": "bigtable listHotTablets Sample", - "origin": "API_DEFINITION", - "description": " Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage.", - "canonical": true, - "file": "bigtable_instance_admin.list_hot_tablets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListHotTablets", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListHotTabletsResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListHotTablets", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async", - "title": "bigtable createTable Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.create_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "table", - "type": ".google.bigtable.admin.v2.Table" - }, - { - "name": "initial_splits", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async", - "title": "bigtable createTableFromSnapshot Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.create_table_from_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTableFromSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "source_snapshot", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateTableFromSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async", - "title": "bigtable listTables Sample", - "origin": "API_DEFINITION", - "description": " Lists all tables served from a specified instance.", - "canonical": true, - "file": "bigtable_table_admin.list_tables.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTables", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.bigtable.admin.v2.Table.View" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListTablesResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListTables", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async", - "title": "bigtable getTable Sample", - "origin": "API_DEFINITION", - "description": " Gets metadata information about the specified table.", - "canonical": true, - "file": "bigtable_table_admin.get_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.bigtable.admin.v2.Table.View" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async", - "title": "bigtable updateTable Sample", - "origin": "API_DEFINITION", - "description": " Updates a specified table.", - "canonical": true, - "file": "bigtable_table_admin.update_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", - "async": true, - "parameters": [ - { - "name": "table", - "type": ".google.bigtable.admin.v2.Table" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UpdateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async", - "title": "bigtable deleteTable Sample", - "origin": "API_DEFINITION", - "description": " Permanently deletes a specified table and all of its data.", - "canonical": true, - "file": "bigtable_table_admin.delete_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async", - "title": "bigtable undeleteTable Sample", - "origin": "API_DEFINITION", - "description": " Restores a specified table which was accidentally deleted.", - "canonical": true, - "file": "bigtable_table_admin.undelete_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UndeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async", - "title": "bigtable createAuthorizedView Sample", - "origin": "API_DEFINITION", - "description": " Creates a new AuthorizedView in a table.", - "canonical": true, - "file": "bigtable_table_admin.create_authorized_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAuthorizedView", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_id", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view", - "type": ".google.bigtable.admin.v2.AuthorizedView" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateAuthorizedView", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async", - "title": "bigtable listAuthorizedViews Sample", - "origin": "API_DEFINITION", - "description": " Lists all AuthorizedViews from a specific table.", - "canonical": true, - "file": "bigtable_table_admin.list_authorized_views.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAuthorizedViews", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.bigtable.admin.v2.AuthorizedView.ResponseView" - } - ], - "resultType": ".google.bigtable.admin.v2.ListAuthorizedViewsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListAuthorizedViews", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async", - "title": "bigtable getAuthorizedView Sample", - "origin": "API_DEFINITION", - "description": " Gets information from a specified AuthorizedView.", - "canonical": true, - "file": "bigtable_table_admin.get_authorized_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAuthorizedView", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.bigtable.admin.v2.AuthorizedView.ResponseView" - } - ], - "resultType": ".google.bigtable.admin.v2.AuthorizedView", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetAuthorizedView", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async", - "title": "bigtable updateAuthorizedView Sample", - "origin": "API_DEFINITION", - "description": " Updates an AuthorizedView in a table.", - "canonical": true, - "file": "bigtable_table_admin.update_authorized_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAuthorizedView", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView", - "async": true, - "parameters": [ - { - "name": "authorized_view", - "type": ".google.bigtable.admin.v2.AuthorizedView" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UpdateAuthorizedView", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async", - "title": "bigtable deleteAuthorizedView Sample", - "origin": "API_DEFINITION", - "description": " Permanently deletes a specified AuthorizedView.", - "canonical": true, - "file": "bigtable_table_admin.delete_authorized_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAuthorizedView", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteAuthorizedView", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async", - "title": "bigtable modifyColumnFamilies Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.modify_column_families.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ModifyColumnFamilies", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "modifications", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ModifyColumnFamilies", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async", - "title": "bigtable dropRowRange Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.drop_row_range.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DropRowRange", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "row_key_prefix", - "type": "TYPE_BYTES" - }, - { - "name": "delete_all_data_from_table", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DropRowRange", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async", - "title": "bigtable generateConsistencyToken Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.generate_consistency_token.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateConsistencyToken", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.GenerateConsistencyTokenResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GenerateConsistencyToken", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async", - "title": "bigtable checkConsistency Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.check_consistency.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckConsistency", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "consistency_token", - "type": "TYPE_STRING" - }, - { - "name": "standard_read_remote_writes", - "type": ".google.bigtable.admin.v2.StandardReadRemoteWrites" - }, - { - "name": "data_boost_read_local_writes", - "type": ".google.bigtable.admin.v2.DataBoostReadLocalWrites" - } - ], - "resultType": ".google.bigtable.admin.v2.CheckConsistencyResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CheckConsistency", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async", - "title": "bigtable snapshotTable Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.snapshot_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SnapshotTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "cluster", - "type": "TYPE_STRING" - }, - { - "name": "snapshot_id", - "type": "TYPE_STRING" - }, - { - "name": "ttl", - "type": ".google.protobuf.Duration" - }, - { - "name": "description", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "SnapshotTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async", - "title": "bigtable getSnapshot Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.get_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Snapshot", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async", - "title": "bigtable listSnapshots Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.list_snapshots.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSnapshots", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListSnapshotsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListSnapshots", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async", - "title": "bigtable deleteSnapshot Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.delete_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async", - "title": "bigtable createBackup Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.create_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "backup", - "type": ".google.bigtable.admin.v2.Backup" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async", - "title": "bigtable getBackup Sample", - "origin": "API_DEFINITION", - "description": " Gets metadata on a pending or completed Cloud Bigtable Backup.", - "canonical": true, - "file": "bigtable_table_admin.get_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Backup", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async", - "title": "bigtable updateBackup Sample", - "origin": "API_DEFINITION", - "description": " Updates a pending or completed Cloud Bigtable Backup.", - "canonical": true, - "file": "bigtable_table_admin.update_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", - "async": true, - "parameters": [ - { - "name": "backup", - "type": ".google.bigtable.admin.v2.Backup" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.bigtable.admin.v2.Backup", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UpdateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async", - "title": "bigtable deleteBackup Sample", - "origin": "API_DEFINITION", - "description": " Deletes a pending or completed Cloud Bigtable backup.", - "canonical": true, - "file": "bigtable_table_admin.delete_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async", - "title": "bigtable listBackups Sample", - "origin": "API_DEFINITION", - "description": " Lists Cloud Bigtable backups. Returns both completed and pending backups.", - "canonical": true, - "file": "bigtable_table_admin.list_backups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 123, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackups", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListBackupsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListBackups", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async", - "title": "bigtable restoreTable Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.restore_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestoreTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "backup", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "RestoreTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async", - "title": "bigtable copyBackup Sample", - "origin": "API_DEFINITION", - "description": " Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.", - "canonical": true, - "file": "bigtable_table_admin.copy_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 86, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CopyBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "source_backup", - "type": "TYPE_STRING" - }, - { - "name": "expire_time", - "type": ".google.protobuf.Timestamp" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CopyBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async", - "title": "bigtable getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for a Table or Backup resource. Returns an empty policy if the resource exists but does not have a policy set.", - "canonical": true, - "file": "bigtable_table_admin.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async", - "title": "bigtable setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy on a Table or Backup resource. Replaces any existing policy.", - "canonical": true, - "file": "bigtable_table_admin.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async", - "title": "bigtable testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns permissions that the caller has on the specified Table or Backup resource.", - "canonical": true, - "file": "bigtable_table_admin.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - } - ] -} diff --git a/owl-bot-staging/admin/v2/src/index.ts b/owl-bot-staging/admin/v2/src/index.ts deleted file mode 100644 index 69e15fa31..000000000 --- a/owl-bot-staging/admin/v2/src/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 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/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client.ts b/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client.ts deleted file mode 100644 index 2e11bb740..000000000 --- a/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client.ts +++ /dev/null @@ -1,2951 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/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; - 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://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [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}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - 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') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - 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; - - 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)) - }; - - // 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']; - 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(); - return this.innerApiCalls.getInstance(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.listInstances(request, options, callback); - } -/** - * 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 - * (`OutputOnly`) - * The current state of the instance. - * @param {google.bigtable.admin.v2.Instance.Type} request.type - * The type of the instance. Defaults to `PRODUCTION`. - * @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 server-assigned 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 {object} [options] - * Call options. See {@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(); - return this.innerApiCalls.updateInstance(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.deleteInstance(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.getCluster(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.listClusters(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.deleteCluster(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.createAppProfile(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.getAppProfile(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.deleteAppProfile(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.getIamPolicy(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.setIamPolicy(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } - -/** - * 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. - * Currently, at most four clusters can be specified. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - createInstance( - request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createInstance( - request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createInstance( - request?: protos.google.bigtable.admin.v2.ICreateInstanceRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createInstance(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - partialUpdateInstance( - request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - partialUpdateInstance( - request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - partialUpdateInstance( - request?: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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(); - return this.innerApiCalls.partialUpdateInstance(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - createCluster( - request: protos.google.bigtable.admin.v2.ICreateClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createCluster( - request: protos.google.bigtable.admin.v2.ICreateClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createCluster( - request?: protos.google.bigtable.admin.v2.ICreateClusterRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createCluster(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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 allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * @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.longrunning.IOperation|undefined, {}|undefined - ]>; - updateCluster( - request: protos.google.bigtable.admin.v2.ICluster, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateCluster( - request: protos.google.bigtable.admin.v2.ICluster, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateCluster( - request?: protos.google.bigtable.admin.v2.ICluster, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateCluster(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - partialUpdateCluster( - request: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - partialUpdateCluster( - request: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - partialUpdateCluster( - request?: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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(); - return this.innerApiCalls.partialUpdateCluster(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAppProfile( - request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAppProfile( - request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAppProfile( - request?: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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(); - return this.innerApiCalls.updateAppProfile(request, options, callback); - } -/** - * 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>{ - 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; - } - /** - * 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(); - return this.innerApiCalls.listAppProfiles(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The 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(); - 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(); - 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(); - return this.innerApiCalls.listHotTablets(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The 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(); - 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(); - return this.descriptors.page.listHotTablets.asyncIterate( - this.innerApiCalls['listHotTablets'] 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 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 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._terminated = true; - stub.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client_config.json b/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client_config.json deleted file mode 100644 index 5080d33ee..000000000 --- a/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_client_config.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "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" - } - } - } - } -} diff --git a/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_proto_list.json b/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_proto_list.json deleted file mode 100644 index 6a7b737f3..000000000 --- a/owl-bot-staging/admin/v2/src/v2/bigtable_instance_admin_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../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/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client.ts b/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client.ts deleted file mode 100644 index 1776e1ded..000000000 --- a/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client.ts +++ /dev/null @@ -1,4182 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/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; - 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://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [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}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - 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') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - 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; - - 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)) - }; - - // 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']; - 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(); - return this.innerApiCalls.createTable(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.getTable(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.deleteTable(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.getAuthorizedView(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.deleteAuthorizedView(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.modifyColumnFamilies(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.dropRowRange(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.generateConsistencyToken(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.checkConsistency(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.getSnapshot(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.deleteSnapshot(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.getBackup(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.updateBackup(request, options, callback); - } -/** - * 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(); - return this.innerApiCalls.deleteBackup(request, options, callback); - } -/** - * Gets the access control policy for a Table or Backup 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(); - return this.innerApiCalls.getIamPolicy(request, options, callback); - } -/** - * Sets the access control policy on a Table or Backup 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(); - return this.innerApiCalls.setIamPolicy(request, options, callback); - } -/** - * Returns permissions that the caller has on the specified Table or Backup - * 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(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } - -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - createTableFromSnapshot( - request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createTableFromSnapshot( - request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createTableFromSnapshot( - request?: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createTableFromSnapshot(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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` - * - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * @param {object} [options] - * Call options. See {@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.longrunning.IOperation|undefined, {}|undefined - ]>; - updateTable( - request: protos.google.bigtable.admin.v2.IUpdateTableRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateTable( - request: protos.google.bigtable.admin.v2.IUpdateTableRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateTable( - request?: protos.google.bigtable.admin.v2.IUpdateTableRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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(); - return this.innerApiCalls.updateTable(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - undeleteTable( - request: protos.google.bigtable.admin.v2.IUndeleteTableRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - undeleteTable( - request: protos.google.bigtable.admin.v2.IUndeleteTableRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - undeleteTable( - request?: protos.google.bigtable.admin.v2.IUndeleteTableRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.undeleteTable(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - createAuthorizedView( - request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAuthorizedView( - request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAuthorizedView( - request?: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createAuthorizedView(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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//instances//tables/
include: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.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.list_app_profiles.jsinclude:samples/generated/v2/bigtable_instance_admin.list_hot_tablets.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.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.js
/authorizedViews/ - * @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.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAuthorizedView( - request: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAuthorizedView( - request: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAuthorizedView( - request?: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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(); - return this.innerApiCalls.updateAuthorizedView(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - snapshotTable( - request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - snapshotTable( - request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - snapshotTable( - request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.snapshotTable(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackup( - request: protos.google.bigtable.admin.v2.ICreateBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackup( - request: protos.google.bigtable.admin.v2.ICreateBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackup( - request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createBackup(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - restoreTable( - request: protos.google.bigtable.admin.v2.IRestoreTableRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreTable( - request: protos.google.bigtable.admin.v2.IRestoreTableRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreTable( - request?: protos.google.bigtable.admin.v2.IRestoreTableRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.restoreTable(request, options, callback); - } -/** - * 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>{ - 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; - } -/** - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - copyBackup( - request: protos.google.bigtable.admin.v2.ICopyBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - copyBackup( - request: protos.google.bigtable.admin.v2.ICopyBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - copyBackup( - request?: protos.google.bigtable.admin.v2.ICopyBackupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.copyBackup(request, options, callback); - } -/** - * 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>{ - 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; - } - /** - * 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(); - return this.innerApiCalls.listTables(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The 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(); - 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(); - 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 views' 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(); - return this.innerApiCalls.listAuthorizedViews(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The 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 views' 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(); - 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 views' 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(); - 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(); - return this.innerApiCalls.listSnapshots(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The 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(); - 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(); - 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(); - return this.innerApiCalls.listBackups(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The 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(); - 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(); - return this.descriptors.page.listBackups.asyncIterate( - this.innerApiCalls['listBackups'] 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 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 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._terminated = true; - stub.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client_config.json b/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client_config.json deleted file mode 100644 index 30f1483d8..000000000 --- a/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_client_config.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "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": 60000, - "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" - } - } - } - } -} diff --git a/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_proto_list.json b/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_proto_list.json deleted file mode 100644 index 6a7b737f3..000000000 --- a/owl-bot-staging/admin/v2/src/v2/bigtable_table_admin_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../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/owl-bot-staging/admin/v2/src/v2/gapic_metadata.json b/owl-bot-staging/admin/v2/src/v2/gapic_metadata.json deleted file mode 100644 index 083ad58bc..000000000 --- a/owl-bot-staging/admin/v2/src/v2/gapic_metadata.json +++ /dev/null @@ -1,571 +0,0 @@ -{ - "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", - "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" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "PartialUpdateInstance": { - "methods": [ - "partialUpdateInstance" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "PartialUpdateCluster": { - "methods": [ - "partialUpdateCluster" - ] - }, - "UpdateAppProfile": { - "methods": [ - "updateAppProfile" - ] - }, - "ListAppProfiles": { - "methods": [ - "listAppProfiles", - "listAppProfilesStream", - "listAppProfilesAsync" - ] - }, - "ListHotTablets": { - "methods": [ - "listHotTablets", - "listHotTabletsStream", - "listHotTabletsAsync" - ] - } - } - }, - "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" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "PartialUpdateInstance": { - "methods": [ - "partialUpdateInstance" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "PartialUpdateCluster": { - "methods": [ - "partialUpdateCluster" - ] - }, - "UpdateAppProfile": { - "methods": [ - "updateAppProfile" - ] - }, - "ListAppProfiles": { - "methods": [ - "listAppProfiles", - "listAppProfilesStream", - "listAppProfilesAsync" - ] - }, - "ListHotTablets": { - "methods": [ - "listHotTablets", - "listHotTabletsStream", - "listHotTabletsAsync" - ] - } - } - } - } - }, - "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" - ] - }, - "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" - ] - }, - "ListTables": { - "methods": [ - "listTables", - "listTablesStream", - "listTablesAsync" - ] - }, - "ListAuthorizedViews": { - "methods": [ - "listAuthorizedViews", - "listAuthorizedViewsStream", - "listAuthorizedViewsAsync" - ] - }, - "ListSnapshots": { - "methods": [ - "listSnapshots", - "listSnapshotsStream", - "listSnapshotsAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - } - } - }, - "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" - ] - }, - "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" - ] - }, - "ListTables": { - "methods": [ - "listTables", - "listTablesStream", - "listTablesAsync" - ] - }, - "ListAuthorizedViews": { - "methods": [ - "listAuthorizedViews", - "listAuthorizedViewsStream", - "listAuthorizedViewsAsync" - ] - }, - "ListSnapshots": { - "methods": [ - "listSnapshots", - "listSnapshotsStream", - "listSnapshotsAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/admin/v2/src/v2/index.ts b/owl-bot-staging/admin/v2/src/v2/index.ts deleted file mode 100644 index 659217a28..000000000 --- a/owl-bot-staging/admin/v2/src/v2/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.js b/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.js deleted file mode 100644 index aec0bda4f..000000000 --- a/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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'); - -function main() { - const bigtableInstanceAdminClient = new admin.BigtableInstanceAdminClient(); - const bigtableTableAdminClient = new admin.BigtableTableAdminClient(); -} - -main(); diff --git a/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 5a621d21b..000000000 --- a/owl-bot-staging/admin/v2/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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'; - -// 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/owl-bot-staging/admin/v2/system-test/install.ts b/owl-bot-staging/admin/v2/system-test/install.ts deleted file mode 100644 index fd5bfdc71..000000000 --- a/owl-bot-staging/admin/v2/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/admin/v2/test/gapic_bigtable_instance_admin_v2.ts b/owl-bot-staging/admin/v2/test/gapic_bigtable_instance_admin_v2.ts deleted file mode 100644 index 03db09e1d..000000000 --- a/owl-bot-staging/admin/v2/test/gapic_bigtable_instance_admin_v2.ts +++ /dev/null @@ -1,3532 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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(); - assert(client.bigtableInstanceAdminStub); - client.close().then(() => { - done(); - }); - }); - - 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(); - }); - }); - - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - await assert.rejects(client.testIamPermissions(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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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('listAppProfiles', () => { - it('invokes listAppProfiles without error', async () => { - const client = new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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('Path templates', () => { - - describe('appProfile', () => { - 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', - }); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('snapshot', () => { - 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', - }); - 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', () => { - 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', - }); - 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/owl-bot-staging/admin/v2/test/gapic_bigtable_table_admin_v2.ts b/owl-bot-staging/admin/v2/test/gapic_bigtable_table_admin_v2.ts deleted file mode 100644 index f746b07f8..000000000 --- a/owl-bot-staging/admin/v2/test/gapic_bigtable_table_admin_v2.ts +++ /dev/null @@ -1,4916 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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(); - assert(client.bigtableTableAdminStub); - client.close().then(() => { - done(); - }); - }); - - 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(); - }); - }); - - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - await assert.rejects(client.testIamPermissions(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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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('listTables', () => { - it('invokes listTables without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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('Path templates', () => { - - describe('appProfile', () => { - 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', - }); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('snapshot', () => { - 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', - }); - 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', () => { - 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', - }); - 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/owl-bot-staging/admin/v2/tsconfig.json b/owl-bot-staging/admin/v2/tsconfig.json deleted file mode 100644 index c78f1c884..000000000 --- a/owl-bot-staging/admin/v2/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/admin/v2/webpack.config.js b/owl-bot-staging/admin/v2/webpack.config.js deleted file mode 100644 index 9b488aad8..000000000 --- a/owl-bot-staging/admin/v2/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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: 'bigtable', - filename: './bigtable.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/owl-bot-staging/v2/.eslintignore b/owl-bot-staging/v2/.eslintignore deleted file mode 100644 index cfc348ec4..000000000 --- a/owl-bot-staging/v2/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/v2/.eslintrc.json b/owl-bot-staging/v2/.eslintrc.json deleted file mode 100644 index 782153495..000000000 --- a/owl-bot-staging/v2/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/v2/.gitignore b/owl-bot-staging/v2/.gitignore deleted file mode 100644 index d4f03a0df..000000000 --- a/owl-bot-staging/v2/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.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/owl-bot-staging/v2/.jsdoc.js b/owl-bot-staging/v2/.jsdoc.js deleted file mode 100644 index 0b0d11479..000000000 --- a/owl-bot-staging/v2/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/bigtable', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/v2/.mocharc.js b/owl-bot-staging/v2/.mocharc.js deleted file mode 100644 index 13b67c34e..000000000 --- a/owl-bot-staging/v2/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/v2/.prettierrc.js b/owl-bot-staging/v2/.prettierrc.js deleted file mode 100644 index 9a8fd6909..000000000 --- a/owl-bot-staging/v2/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/v2/README.md b/owl-bot-staging/v2/README.md deleted file mode 100644 index c464f1223..000000000 --- a/owl-bot-staging/v2/README.md +++ /dev/null @@ -1 +0,0 @@ -Bigtable: Nodejs Client diff --git a/owl-bot-staging/v2/package.json b/owl-bot-staging/v2/package.json deleted file mode 100644 index d7984aef3..000000000 --- a/owl-bot-staging/v2/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/bigtable", - "version": "0.1.0", - "description": "Bigtable client for Node.js", - "repository": "googleapis/nodejs-bigtable", - "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 bigtable", - "bigtable", - "bigtable" - ], - "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 build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/bigtable.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/bigtable.proto deleted file mode 100644 index 7c85b3f75..000000000 --- a/owl-bot-staging/v2/protos/google/bigtable/v2/bigtable.proto +++ /dev/null @@ -1,1102 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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/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}" -}; - -// 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: "*" - } - }; - 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - }; - 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. - 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" - } - }; - 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - }; - 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - }; - 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - }; - 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - }; - 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: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - }; - option (google.api.method_signature) = "table_name,row_key,rules"; - option (google.api.method_signature) = - "table_name,row_key,rules,app_profile_id"; - } - - // NOTE: This API is intended to be used by Apache Beam BigtableIO. - // 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`. - 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"; - } - - // NOTE: This API is intended to be used by Apache Beam BigtableIO. - // Reads changes from a table's change stream. Changes will - // reflect both user-initiated mutations and mutations that are caused by - // garbage collection. - 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"; - } - - // Executes a BTQL query against a particular Cloud 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"; - } -} - -// 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/
include: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.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.js
`. - 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" - } - ]; - - // 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, provide enhanced query performance statistics. The semantics - // dictate: - // * request_stats is empty on every (streamed) response, except - // * request_stats has non-empty information after all chunks have been - // streamed, where the ReadRowsResponse message only contains - // request_stats. - // * For example, if a read request would have returned an empty - // response instead a single ReadRowsResponse is streamed with empty - // chunks and request_stats filled. - // - // Visually, response messages will stream as follows: - // ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - // \______________________/ \________________________________/ - // Primary response Trailer of RequestStats info - // - // Or if the read did not return any values: - // {chunks: [], request_stats: {...}} - // \________________________________/ - // Trailer of RequestStats info - 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" - } - ]; - - // 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.SampleRowKeys. -message SampleRowKeysResponse { - // Sorted streamed sequence of sample row keys in the table. 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. - // 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`. 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]; -} - -// 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]; - } - - // 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. - 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 is 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 is 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. - string query = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Requested data format for the response. - oneof data_format { - // Protocol buffer format as described by ProtoSchema and ProtoRows - // messages. - ProtoFormat proto_format = 4; - } - - // 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. - // - // In case of Value.kind is not set, it will be set to corresponding null - // value in googlesql. - // `params["firstName"] = type {string_type {}}` - // then `@firstName` will be replaced with googlesql null string. - // - // Value.type should always be set and no inference of type will be made from - // Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - // error. - map params = 7 [(google.api.field_behavior) = REQUIRED]; -} - -// 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; - } -} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/data.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/data.proto deleted file mode 100644 index 8265611f3..000000000 --- a/owl-bot-staging/v2/protos/google/bigtable/v2/data.proto +++ /dev/null @@ -1,777 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. - 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; - } -} - -// 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; - } -} - -// 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; -} - -// Batch of serialized ProtoRows. -message ProtoRowsBatch { - // Merge partial results by concatenating these bytes, then parsing the - // overall value as a `ProtoRows` message. - bytes batch_data = 1; -} - -// A partial result set from the streaming query API. -// CBT client will buffer partial_rows from result_sets until it gets a -// resumption_token. -message PartialResultSet { - // Partial Rows in one of the supported formats. It may require many - // PartialResultSets to stream a batch of rows that can decoded on the client. - // The client should buffer partial_rows until it gets a `resume_token`, - // at which point the batch is complete and can be decoded and yielded to the - // user. Each sub-message documents the appropriate way to combine results. - oneof partial_rows { - // Partial rows in serialized ProtoRows format. - ProtoRowsBatch proto_rows_batch = 3; - } - - // An opaque token sent by the server to allow query resumption and signal - // the client to accumulate `partial_rows` since the last non-empty - // `resume_token`. On resumption, the resumed query will return the remaining - // rows for this query. - // - // If there is a batch in progress, a non-empty `resume_token` - // means that that the batch of `partial_rows` will be complete after merging - // the `partial_rows` from this response. The client must only yield - // completed batches to the application, and must ensure that any future - // retries send the latest token to avoid returning duplicate data. - // - // The server may set 'resume_token' without a 'partial_rows'. If there is a - // batch in progress the client should yield it. - // - // 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 - // `partial_rows`, then return OK. - bytes resume_token = 5; - - // Estimated size of a new batch. The server will always set this when - // returning the first `partial_rows` of a batch, and will not set it at any - // other time. - // - // The client can use this estimate to allocate an initial buffer for the - // batched 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; -} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/feature_flags.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/feature_flags.proto deleted file mode 100644 index e97f23e15..000000000 --- a/owl-bot-staging/v2/protos/google/bigtable/v2/feature_flags.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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; -} diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/request_stats.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/request_stats.proto deleted file mode 100644 index c82876876..000000000 --- a/owl-bot-staging/v2/protos/google/bigtable/v2/request_stats.proto +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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, there are the following supported methods: -// * 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/owl-bot-staging/v2/protos/google/bigtable/v2/response_params.proto b/owl-bot-staging/v2/protos/google/bigtable/v2/response_params.proto deleted file mode 100644 index feb0f7d2a..000000000 --- a/owl-bot-staging/v2/protos/google/bigtable/v2/response_params.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 -// This is an experimental feature that will be used to get zone_id and -// cluster_id from response trailers to tag the metrics. This should not be -// used by customers directly -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; -} diff --git a/owl-bot-staging/v2/protos/protos.d.ts b/owl-bot-staging/v2/protos/protos.d.ts deleted file mode 100644 index f50c8e27f..000000000 --- a/owl-bot-staging/v2/protos/protos.d.ts +++ /dev/null @@ -1,18201 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 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 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; - } - - 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|executeQuery}. - * @param error Error, if any - * @param [response] ExecuteQueryResponse - */ - type ExecuteQueryCallback = (error: (Error|null), response?: google.bigtable.v2.ExecuteQueryResponse) => void; - } - - /** Properties of a ReadRowsRequest. */ - interface IReadRowsRequest { - - /** ReadRowsRequest tableName */ - tableName?: (string|null); - - /** ReadRowsRequest authorizedViewName */ - authorizedViewName?: (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 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|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|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|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|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|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|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 appProfileId */ - appProfileId?: (string|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 appProfileId. */ - public appProfileId: string; - - /** - * 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|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|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|string|null); - - /** MutateRowRequest mutations */ - mutations?: (google.bigtable.v2.IMutation[]|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|string); - - /** MutateRowRequest mutations. */ - public mutations: google.bigtable.v2.IMutation[]; - - /** - * 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|string|null); - - /** Entry mutations */ - mutations?: (google.bigtable.v2.IMutation[]|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|string); - - /** Entry mutations. */ - public mutations: google.bigtable.v2.IMutation[]; - - /** - * 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); - - /** MutateRowsResponse _rateLimitInfo. */ - public _rateLimitInfo?: "rateLimitInfo"; - - /** - * 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|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|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|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|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|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|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 protoFormat */ - protoFormat?: (google.bigtable.v2.IProtoFormat|null); - - /** ExecuteQueryRequest resumeToken */ - resumeToken?: (Uint8Array|string|null); - - /** ExecuteQueryRequest params */ - params?: ({ [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 protoFormat. */ - public protoFormat?: (google.bigtable.v2.IProtoFormat|null); - - /** ExecuteQueryRequest resumeToken. */ - public resumeToken: (Uint8Array|string); - - /** ExecuteQueryRequest params. */ - public params: { [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 Row. */ - interface IRow { - - /** Row key */ - key?: (Uint8Array|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|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|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|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|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|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|string|null); - - /** Value rawTimestampMicros */ - rawTimestampMicros?: (number|Long|string|null); - - /** Value bytesValue */ - bytesValue?: (Uint8Array|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|string|null); - - /** Value rawTimestampMicros. */ - public rawTimestampMicros?: (number|Long|string|null); - - /** Value bytesValue. */ - public bytesValue?: (Uint8Array|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|string|null); - - /** RowRange startKeyOpen */ - startKeyOpen?: (Uint8Array|string|null); - - /** RowRange endKeyOpen */ - endKeyOpen?: (Uint8Array|string|null); - - /** RowRange endKeyClosed */ - endKeyClosed?: (Uint8Array|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|string|null); - - /** RowRange startKeyOpen. */ - public startKeyOpen?: (Uint8Array|string|null); - - /** RowRange endKeyOpen. */ - public endKeyOpen?: (Uint8Array|string|null); - - /** RowRange endKeyClosed. */ - public endKeyClosed?: (Uint8Array|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|string|null); - - /** ColumnRange startQualifierOpen */ - startQualifierOpen?: (Uint8Array|string|null); - - /** ColumnRange endQualifierClosed */ - endQualifierClosed?: (Uint8Array|string|null); - - /** ColumnRange endQualifierOpen */ - endQualifierOpen?: (Uint8Array|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|string|null); - - /** ColumnRange startQualifierOpen. */ - public startQualifierOpen?: (Uint8Array|string|null); - - /** ColumnRange endQualifierClosed. */ - public endQualifierClosed?: (Uint8Array|string|null); - - /** ColumnRange endQualifierOpen. */ - public endQualifierOpen?: (Uint8Array|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|string|null); - - /** ValueRange startValueOpen */ - startValueOpen?: (Uint8Array|string|null); - - /** ValueRange endValueClosed */ - endValueClosed?: (Uint8Array|string|null); - - /** ValueRange endValueOpen */ - endValueOpen?: (Uint8Array|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|string|null); - - /** ValueRange startValueOpen. */ - public startValueOpen?: (Uint8Array|string|null); - - /** ValueRange endValueClosed. */ - public endValueClosed?: (Uint8Array|string|null); - - /** ValueRange endValueOpen. */ - public endValueOpen?: (Uint8Array|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 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|string|null); - - /** RowFilter rowSampleFilter */ - rowSampleFilter?: (number|null); - - /** RowFilter familyNameRegexFilter */ - familyNameRegexFilter?: (string|null); - - /** RowFilter columnQualifierRegexFilter */ - columnQualifierRegexFilter?: (Uint8Array|string|null); - - /** RowFilter columnRangeFilter */ - columnRangeFilter?: (google.bigtable.v2.IColumnRange|null); - - /** RowFilter timestampRangeFilter */ - timestampRangeFilter?: (google.bigtable.v2.ITimestampRange|null); - - /** RowFilter valueRegexFilter */ - valueRegexFilter?: (Uint8Array|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); - } - - /** 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|string|null); - - /** RowFilter rowSampleFilter. */ - public rowSampleFilter?: (number|null); - - /** RowFilter familyNameRegexFilter. */ - public familyNameRegexFilter?: (string|null); - - /** RowFilter columnQualifierRegexFilter. */ - public columnQualifierRegexFilter?: (Uint8Array|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|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 filter. */ - public filter?: ("chain"|"interleave"|"condition"|"sink"|"passAllFilter"|"blockAllFilter"|"rowKeyRegexFilter"|"rowSampleFilter"|"familyNameRegexFilter"|"columnQualifierRegexFilter"|"columnRangeFilter"|"timestampRangeFilter"|"valueRegexFilter"|"valueRangeFilter"|"cellsPerRowOffsetFilter"|"cellsPerRowLimitFilter"|"cellsPerColumnLimitFilter"|"stripValueTransformer"|"applyLabelTransformer"); - - /** - * 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|string|null); - - /** SetCell timestampMicros */ - timestampMicros?: (number|Long|string|null); - - /** SetCell value */ - value?: (Uint8Array|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|string); - - /** SetCell timestampMicros. */ - public timestampMicros: (number|Long|string); - - /** SetCell value. */ - public value: (Uint8Array|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|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|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|string|null); - - /** ReadModifyWriteRule appendValue */ - appendValue?: (Uint8Array|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|string); - - /** ReadModifyWriteRule appendValue. */ - public appendValue?: (Uint8Array|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|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|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 resumeToken */ - resumeToken?: (Uint8Array|string|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 resumeToken. */ - public resumeToken: (Uint8Array|string); - - /** 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 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); - } - - /** 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 kind. */ - public kind?: ("bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"); - - /** - * 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 { - } - - /** 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); - - /** - * 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 { - } - - /** 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); - - /** - * 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); - } - - /** 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 encoding. */ - public encoding?: "bigEndianBytes"; - - /** - * 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 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 { - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.Type.ITimestamp); - - /** - * 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; - } - - /** 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); - } - - /** 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[]; - - /** - * 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 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; - } - - /** 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); - } - - /** 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; - - /** - * Creates a new FeatureFlags instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureFlags instance - */ - public static create(properties?: google.bigtable.v2.IFeatureFlags): google.bigtable.v2.FeatureFlags; - - /** - * Encodes the specified FeatureFlags message. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. - * @param message FeatureFlags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.bigtable.v2.IFeatureFlags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureFlags message, length delimited. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. - * @param message FeatureFlags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.bigtable.v2.IFeatureFlags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureFlags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureFlags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.FeatureFlags; - - /** - * Decodes a FeatureFlags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureFlags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.FeatureFlags; - - /** - * Verifies a FeatureFlags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureFlags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureFlags - */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.FeatureFlags; - - /** - * Creates a plain object from a FeatureFlags message. Also converts values to other types if specified. - * @param message FeatureFlags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.bigtable.v2.FeatureFlags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureFlags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureFlags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResponseParams. */ - interface IResponseParams { - - /** ResponseParams zoneId */ - zoneId?: (string|null); - - /** ResponseParams clusterId */ - clusterId?: (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 _zoneId. */ - public _zoneId?: "zoneId"; - - /** ResponseParams _clusterId. */ - public _clusterId?: "clusterId"; - - /** - * 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); - } - - /** 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[]; - - /** - * 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); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** 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); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** 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 - } - - /** 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_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 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 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); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** 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); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions 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.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 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 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 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 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 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.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); - } - - /** 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|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a 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); - } - - /** 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); - - /** - * 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 - } - } - - /** 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 features */ - features?: (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 features. */ - public features?: (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 - } - } - } - - /** 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 DoubleValue. */ - interface IDoubleValue { - - /** DoubleValue value */ - value?: (number|null); - } - - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { - - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); - - /** DoubleValue value. */ - public value: number; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; - - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FloatValue. */ - interface IFloatValue { - - /** FloatValue value */ - value?: (number|null); - } - - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { - - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); - - /** FloatValue value. */ - public value: number; - - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; - - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int64Value. */ - interface IInt64Value { - - /** Int64Value value */ - value?: (number|Long|string|null); - } - - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { - - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); - - /** Int64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; - - /** - * Verifies an Int64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (number|Long|string|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { - - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; - - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int32Value. */ - interface IInt32Value { - - /** Int32Value value */ - value?: (number|null); - } - - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { - - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); - - /** Int32Value value. */ - public value: number; - - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; - - /** - * Verifies an Int32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt32Value. */ - interface IUInt32Value { - - /** UInt32Value value */ - value?: (number|null); - } - - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { - - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); - - /** UInt32Value value. */ - public value: number; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; - - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BoolValue. */ - interface IBoolValue { - - /** BoolValue value */ - value?: (boolean|null); - } - - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { - - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); - - /** BoolValue value. */ - public value: boolean; - - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; - - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringValue. */ - interface IStringValue { - - /** StringValue value */ - value?: (string|null); - } - - /** Represents a StringValue. */ - class StringValue implements IStringValue { - - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); - - /** StringValue value. */ - public value: string; - - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; - - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|string|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: (Uint8Array|string); - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; - - /** - * Verifies a BytesValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a Date. */ - interface IDate { - - /** Date year */ - year?: (number|null); - - /** Date month */ - month?: (number|null); - - /** Date day */ - day?: (number|null); - } - - /** Represents a Date. */ - class Date implements IDate { - - /** - * Constructs a new Date. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IDate); - - /** Date year. */ - public year: number; - - /** Date month. */ - public month: number; - - /** Date day. */ - public day: number; - - /** - * Creates a new Date instance using the specified properties. - * @param [properties] Properties to set - * @returns Date instance - */ - public static create(properties?: google.type.IDate): google.type.Date; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Date message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; - - /** - * Verifies a Date message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Date - */ - public static fromObject(object: { [k: string]: any }): google.type.Date; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @param message Date - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Date to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Date - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** 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; - } - } -} diff --git a/owl-bot-staging/v2/protos/protos.js b/owl-bot-staging/v2/protos/protos.js deleted file mode 100644 index 2b4507225..000000000 --- a/owl-bot-staging/v2/protos/protos.js +++ /dev/null @@ -1,46519 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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_protos || ($protobuf.roots._google_cloud_bigtable_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.bigtable = (function() { - - /** - * Namespace bigtable. - * @memberof google - * @namespace - */ - var bigtable = {}; - - 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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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|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 this.rpcCall(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 - */ - - 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} [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) - 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 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) - $root.google.bigtable.v2.RowSet.encode(message.rows, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableName = reader.string(); - break; - } - case 9: { - message.authorizedViewName = reader.string(); - break; - } - case 5: { - message.appProfileId = reader.string(); - break; - } - case 2: { - message.rows = $root.google.bigtable.v2.RowSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.filter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - var error = $root.google.bigtable.v2.RowSet.verify(message.rows); - if (error) - return "rows." + error; - } - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.rowsLimit != null && message.hasOwnProperty("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 && message.hasOwnProperty("requestStatsView")) - switch (message.requestStatsView) { - default: - return "requestStatsView: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.reversed != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.ReadRowsRequest) - return object; - 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.appProfileId != null) - message.appProfileId = String(object.appProfileId); - if (object.rows != null) { - if (typeof object.rows !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsRequest.rows: object expected"); - message.rows = $root.google.bigtable.v2.RowSet.fromObject(object.rows); - } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsRequest.filter: object expected"); - message.filter = $root.google.bigtable.v2.RowFilter.fromObject(object.filter); - } - if (object.rowsLimit != null) - if ($util.Long) - (message.rowsLimit = $util.Long.fromValue(object.rowsLimit)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.rowsLimit = options.longs === String ? "0" : 0; - object.appProfileId = ""; - object.requestStatsView = options.enums === String ? "REQUEST_STATS_VIEW_UNSPECIFIED" : 0; - object.reversed = false; - object.authorizedViewName = ""; - } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.rows != null && message.hasOwnProperty("rows")) - object.rows = $root.google.bigtable.v2.RowSet.toObject(message.rows, options); - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.bigtable.v2.RowFilter.toObject(message.filter, options); - if (message.rowsLimit != null && message.hasOwnProperty("rowsLimit")) - 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 && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.requestStatsView != null && message.hasOwnProperty("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 && message.hasOwnProperty("reversed")) - object.reversed = message.reversed; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - object.authorizedViewName = message.authorizedViewName; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - case 2: { - message.lastScannedRowKey = reader.bytes(); - break; - } - case 3: { - message.requestStats = $root.google.bigtable.v2.RequestStats.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chunks != null && message.hasOwnProperty("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]); - if (error) - return "chunks." + error; - } - } - if (message.lastScannedRowKey != null && message.hasOwnProperty("lastScannedRowKey")) - if (!(message.lastScannedRowKey && typeof message.lastScannedRowKey.length === "number" || $util.isString(message.lastScannedRowKey))) - return "lastScannedRowKey: buffer expected"; - if (message.requestStats != null && message.hasOwnProperty("requestStats")) { - var error = $root.google.bigtable.v2.RequestStats.verify(message.requestStats); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadRowsResponse) - return object; - 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 (typeof object.chunks[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsResponse.chunks: object expected"); - message.chunks[i] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.fromObject(object.chunks[i]); - } - } - 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 (typeof object.requestStats !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsResponse.requestStats: object expected"); - message.requestStats = $root.google.bigtable.v2.RequestStats.fromObject(object.requestStats); - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.lastScannedRowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("requestStats")) - object.requestStats = $root.google.bigtable.v2.RequestStats.toObject(message.requestStats, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.rowKey = reader.bytes(); - break; - } - case 2: { - message.familyName = $root.google.protobuf.StringValue.decode(reader, reader.uint32()); - break; - } - case 3: { - message.qualifier = $root.google.protobuf.BytesValue.decode(reader, reader.uint32()); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) { - var error = $root.google.protobuf.StringValue.verify(message.familyName); - if (error) - return "familyName." + error; - } - if (message.qualifier != null && message.hasOwnProperty("qualifier")) { - var error = $root.google.protobuf.BytesValue.verify(message.qualifier); - if (error) - return "qualifier." + error; - } - if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - if (message.valueSize != null && message.hasOwnProperty("valueSize")) - if (!$util.isInteger(message.valueSize)) - return "valueSize: integer expected"; - if (message.resetRow != null && message.hasOwnProperty("resetRow")) { - properties.rowStatus = 1; - if (typeof message.resetRow !== "boolean") - return "resetRow: boolean expected"; - } - if (message.commitRow != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.ReadRowsResponse.CellChunk) - return object; - 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 (typeof object.familyName !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.familyName: object expected"); - message.familyName = $root.google.protobuf.StringValue.fromObject(object.familyName); - } - if (object.qualifier != null) { - if (typeof object.qualifier !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier: object expected"); - message.qualifier = $root.google.protobuf.BytesValue.fromObject(object.qualifier); - } - if (object.timestampMicros != null) - if ($util.Long) - (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("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 && message.hasOwnProperty("familyName")) - object.familyName = $root.google.protobuf.StringValue.toObject(message.familyName, options); - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - object.qualifier = $root.google.protobuf.BytesValue.toObject(message.qualifier, options); - if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) - 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 && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.valueSize != null && message.hasOwnProperty("valueSize")) - object.valueSize = message.valueSize; - if (message.resetRow != null && message.hasOwnProperty("resetRow")) { - object.resetRow = message.resetRow; - if (options.oneofs) - object.rowStatus = "resetRow"; - } - if (message.commitRow != null && message.hasOwnProperty("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} [appProfileId] SampleRowKeysRequest appProfileId - */ - - /** - * 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) - 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 appProfileId. - * @member {string} appProfileId - * @memberof google.bigtable.v2.SampleRowKeysRequest - * @instance - */ - SampleRowKeysRequest.prototype.appProfileId = ""; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.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); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableName = reader.string(); - break; - } - case 4: { - message.authorizedViewName = reader.string(); - break; - } - case 2: { - message.appProfileId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - 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) { - if (object instanceof $root.google.bigtable.v2.SampleRowKeysRequest) - return object; - 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.appProfileId != null) - message.appProfileId = String(object.appProfileId); - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tableName = ""; - object.appProfileId = ""; - object.authorizedViewName = ""; - } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - object.authorizedViewName = message.authorizedViewName; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rowKey = reader.bytes(); - break; - } - case 2: { - message.offsetBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.offsetBytes != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.SampleRowKeysResponse) - return object; - 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)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.offsetBytes = options.longs === String ? "0" : 0; - } - if (message.rowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("offsetBytes")) - 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 - */ - - /** - * 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) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); - if (message.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()).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 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.mutations != null && message.hasOwnProperty("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]); - if (error) - return "mutations." + 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) { - if (object instanceof $root.google.bigtable.v2.MutateRowRequest) - return object; - 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 (typeof object.mutations[i] !== "object") - throw TypeError(".google.bigtable.v2.MutateRowRequest.mutations: object expected"); - message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i]); - } - } - 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) { - if (!options) - options = {}; - 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 = ""; - } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.rowKey != null && message.hasOwnProperty("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); - } - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - object.authorizedViewName = message.authorizedViewName; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.entries != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.MutateRowsRequest) - return object; - 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 (typeof object.entries[i] !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsRequest.entries: object expected"); - message.entries[i] = $root.google.bigtable.v2.MutateRowsRequest.Entry.fromObject(object.entries[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) { - object.tableName = ""; - object.appProfileId = ""; - object.authorizedViewName = ""; - } - if (message.tableName != null && message.hasOwnProperty("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); - } - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("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 - */ - - /** - * 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) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.mutations != null && message.hasOwnProperty("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]); - if (error) - return "mutations." + 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) { - if (object instanceof $root.google.bigtable.v2.MutateRowsRequest.Entry) - return object; - 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 (typeof object.mutations[i] !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.mutations: object expected"); - message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.rowKey != null && message.hasOwnProperty("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); - } - 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) - 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; - - /** - * MutateRowsResponse _rateLimitInfo. - * @member {"rateLimitInfo"|undefined} _rateLimitInfo - * @memberof google.bigtable.v2.MutateRowsResponse - * @instance - */ - Object.defineProperty(MutateRowsResponse.prototype, "_rateLimitInfo", { - get: $util.oneOfGetter($oneOfFields = ["rateLimitInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MutateRowsResponse instance using the specified properties. - * @function create - * @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) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.bigtable.v2.MutateRowsResponse.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) - $root.google.bigtable.v2.RateLimitInfo.encode(message.rateLimitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - case 3: { - message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.bigtable.v2.MutateRowsResponse.Entry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { - properties._rateLimitInfo = 1; - { - var error = $root.google.bigtable.v2.RateLimitInfo.verify(message.rateLimitInfo); - if (error) - return "rateLimitInfo." + error; - } - } - return null; - }; - - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.MutateRowsResponse) - return object; - 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 (typeof object.entries[i] !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsResponse.entries: object expected"); - message.entries[i] = $root.google.bigtable.v2.MutateRowsResponse.Entry.fromObject(object.entries[i]); - } - } - if (object.rateLimitInfo != null) { - if (typeof object.rateLimitInfo !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsResponse.rateLimitInfo: object expected"); - message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.fromObject(object.rateLimitInfo); - } - return message; - }; - - /** - * 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) { - if (!options) - options = {}; - 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); - } - if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { - object.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.toObject(message.rateLimitInfo, options); - if (options.oneofs) - object._rateLimitInfo = "rateLimitInfo"; - } - return object; - }; - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.index = reader.int64(); - break; - } - case 2: { - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.index != null && message.hasOwnProperty("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 && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - 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) { - if (object instanceof $root.google.bigtable.v2.MutateRowsResponse.Entry) - return object; - var message = new $root.google.bigtable.v2.MutateRowsResponse.Entry(); - if (object.index != null) - if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = 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 (typeof object.status !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsResponse.Entry.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); - } - 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) { - if (!options) - options = {}; - 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() : long; - } else - object.index = options.longs === String ? "0" : 0; - object.status = null; - } - if (message.index != null && message.hasOwnProperty("index")) - 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 && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.period != null && Object.hasOwnProperty.call(message, "period")) - $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.factor != null && Object.hasOwnProperty.call(message, "factor")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.factor); - return writer; - }; - - /** - * Encodes the specified RateLimitInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {google.bigtable.v2.IRateLimitInfo} message RateLimitInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RateLimitInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RateLimitInfo message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RateLimitInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RateLimitInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.factor = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RateLimitInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RateLimitInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RateLimitInfo message. - * @function verify - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RateLimitInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.period != null && message.hasOwnProperty("period")) { - var error = $root.google.protobuf.Duration.verify(message.period); - if (error) - return "period." + error; - } - if (message.factor != null && message.hasOwnProperty("factor")) - if (typeof message.factor !== "number") - return "factor: number expected"; - return null; - }; - - /** - * Creates a RateLimitInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {Object.} object Plain object - * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo - */ - RateLimitInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.RateLimitInfo) - return object; - var message = new $root.google.bigtable.v2.RateLimitInfo(); - if (object.period != null) { - if (typeof object.period !== "object") - throw TypeError(".google.bigtable.v2.RateLimitInfo.period: object expected"); - message.period = $root.google.protobuf.Duration.fromObject(object.period); - } - if (object.factor != null) - message.factor = Number(object.factor); - return message; - }; - - /** - * Creates a plain object from a RateLimitInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {google.bigtable.v2.RateLimitInfo} message RateLimitInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RateLimitInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.period = null; - object.factor = 0; - } - if (message.period != null && message.hasOwnProperty("period")) - object.period = $root.google.protobuf.Duration.toObject(message.period, options); - if (message.factor != null && message.hasOwnProperty("factor")) - object.factor = options.json && !isFinite(message.factor) ? String(message.factor) : message.factor; - return object; - }; - - /** - * Converts this RateLimitInfo to JSON. - * @function toJSON - * @memberof google.bigtable.v2.RateLimitInfo - * @instance - * @returns {Object.} JSON object - */ - RateLimitInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RateLimitInfo - * @function getTypeUrl - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RateLimitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.bigtable.v2.RateLimitInfo"; - }; - - return RateLimitInfo; - })(); - - v2.CheckAndMutateRowRequest = (function() { - - /** - * Properties of a CheckAndMutateRowRequest. - * @memberof google.bigtable.v2 - * @interface ICheckAndMutateRowRequest - * @property {string|null} [tableName] CheckAndMutateRowRequest tableName - * @property {string|null} [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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); - if (message.trueMutations != null && message.trueMutations.length) - for (var i = 0; i < message.trueMutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.trueMutations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.falseMutations != null && message.falseMutations.length) - for (var i = 0; i < message.falseMutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.falseMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) - $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.appProfileId); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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()); - break; - } - case 4: { - if (!(message.trueMutations && message.trueMutations.length)) - message.trueMutations = []; - message.trueMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.falseMutations && message.falseMutations.length)) - message.falseMutations = []; - message.falseMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter); - if (error) - return "predicateFilter." + error; - } - if (message.trueMutations != null && message.hasOwnProperty("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]); - if (error) - return "trueMutations." + error; - } - } - if (message.falseMutations != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowRequest) - return object; - 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 (typeof object.predicateFilter !== "object") - throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.predicateFilter: object expected"); - message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter); - } - 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 (typeof object.trueMutations[i] !== "object") - throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.trueMutations: object expected"); - message.trueMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.trueMutations[i]); - } - } - 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 (typeof object.falseMutations[i] !== "object") - throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.falseMutations: object expected"); - message.falseMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.falseMutations[i]); - } - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.rowKey != null && message.hasOwnProperty("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); - } - 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); - } - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) - object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.predicateMatched = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.predicateMatched != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowResponse) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.predicateMatched = false; - if (message.predicateMatched != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.appProfileId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.PingAndWarmRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.appProfileId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.appProfileId != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.bigtable.v2.ReadModifyWriteRule.verify(message.rules[i]); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowRequest) - return object; - 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 (typeof object.rules[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest.rules: object expected"); - message.rules[i] = $root.google.bigtable.v2.ReadModifyWriteRule.fromObject(object.rules[i]); - } - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.rowKey != null && message.hasOwnProperty("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); - } - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.row = $root.google.bigtable.v2.Row.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.row != null && message.hasOwnProperty("row")) { - var error = $root.google.bigtable.v2.Row.verify(message.row); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowResponse) - return object; - var message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); - if (object.row != null) { - if (typeof object.row !== "object") - throw TypeError(".google.bigtable.v2.ReadModifyWriteRowResponse.row: object expected"); - message.row = $root.google.bigtable.v2.Row.fromObject(object.row); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.row = null; - if (message.row != null && message.hasOwnProperty("row")) - object.row = $root.google.bigtable.v2.Row.toObject(message.row, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableName = reader.string(); - break; - } - case 2: { - message.appProfileId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tableName = ""; - object.appProfileId = ""; - } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.appProfileId != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partition != null && message.hasOwnProperty("partition")) { - var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); - 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) { - if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) - return object; - var message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.partition: object expected"); - message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.partition = null; - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.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()).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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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()); - break; - } - case 4: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.decode(reader, reader.uint32()); - break; - } - case 5: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.heartbeatDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.partition != null && message.hasOwnProperty("partition")) { - var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); - if (error) - return "partition." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - properties.startFrom = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - } - if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { - if (properties.startFrom === 1) - return "startFrom: multiple values"; - properties.startFrom = 1; - { - var error = $root.google.bigtable.v2.StreamContinuationTokens.verify(message.continuationTokens); - if (error) - return "continuationTokens." + error; - } - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) { - var error = $root.google.protobuf.Duration.verify(message.heartbeatDuration); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamRequest) - return object; - 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 (typeof object.partition !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.partition: object expected"); - message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.continuationTokens != null) { - if (typeof object.continuationTokens !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.continuationTokens: object expected"); - message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.fromObject(object.continuationTokens); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.heartbeatDuration != null) { - if (typeof object.heartbeatDuration !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.heartbeatDuration: object expected"); - message.heartbeatDuration = $root.google.protobuf.Duration.fromObject(object.heartbeatDuration); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tableName = ""; - object.appProfileId = ""; - object.partition = null; - object.endTime = null; - object.heartbeatDuration = null; - } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) { - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (options.oneofs) - object.startFrom = "startTime"; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { - object.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.toObject(message.continuationTokens, options); - if (options.oneofs) - object.startFrom = "continuationTokens"; - } - if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) - object.heartbeatDuration = $root.google.protobuf.Duration.toObject(message.heartbeatDuration, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.decode(reader, reader.uint32()); - break; - } - case 2: { - message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.decode(reader, reader.uint32()); - break; - } - case 3: { - message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataChange != null && message.hasOwnProperty("dataChange")) { - properties.streamRecord = 1; - { - var error = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify(message.dataChange); - if (error) - return "dataChange." + error; - } - } - if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { - if (properties.streamRecord === 1) - return "streamRecord: multiple values"; - properties.streamRecord = 1; - { - var error = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify(message.heartbeat); - if (error) - return "heartbeat." + error; - } - } - if (message.closeStream != null && message.hasOwnProperty("closeStream")) { - if (properties.streamRecord === 1) - return "streamRecord: multiple values"; - properties.streamRecord = 1; - { - var error = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify(message.closeStream); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse) - return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); - if (object.dataChange != null) { - if (typeof object.dataChange !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.dataChange: object expected"); - message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.fromObject(object.dataChange); - } - if (object.heartbeat != null) { - if (typeof object.heartbeat !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.heartbeat: object expected"); - message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.fromObject(object.heartbeat); - } - if (object.closeStream != null) { - if (typeof object.closeStream !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.closeStream: object expected"); - message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.fromObject(object.closeStream); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.dataChange != null && message.hasOwnProperty("dataChange")) { - object.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.toObject(message.dataChange, options); - if (options.oneofs) - object.streamRecord = "dataChange"; - } - if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { - object.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.toObject(message.heartbeat, options); - if (options.oneofs) - object.streamRecord = "heartbeat"; - } - if (message.closeStream != null && message.hasOwnProperty("closeStream")) { - object.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.toObject(message.closeStream, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.decode(reader, reader.uint32()); - break; - } - case 2: { - message.mutation = $root.google.bigtable.v2.Mutation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) { - var error = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify(message.chunkInfo); - if (error) - return "chunkInfo." + error; - } - if (message.mutation != null && message.hasOwnProperty("mutation")) { - var error = $root.google.bigtable.v2.Mutation.verify(message.mutation); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) - return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(); - if (object.chunkInfo != null) { - if (typeof object.chunkInfo !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.chunkInfo: object expected"); - message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.fromObject(object.chunkInfo); - } - if (object.mutation != null) { - if (typeof object.mutation !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.mutation: object expected"); - message.mutation = $root.google.bigtable.v2.Mutation.fromObject(object.mutation); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.chunkInfo = null; - object.mutation = null; - } - if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) - object.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.toObject(message.chunkInfo, options); - if (message.mutation != null && message.hasOwnProperty("mutation")) - object.mutation = $root.google.bigtable.v2.Mutation.toObject(message.mutation, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) - if (!$util.isInteger(message.chunkedValueSize)) - return "chunkedValueSize: integer expected"; - if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) - if (!$util.isInteger(message.chunkedValueOffset)) - return "chunkedValueOffset: integer expected"; - if (message.lastChunk != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.chunkedValueSize = 0; - object.chunkedValueOffset = 0; - object.lastChunk = false; - } - if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) - object.chunkedValueSize = message.chunkedValueSize; - if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) - object.chunkedValueOffset = message.chunkedValueOffset; - if (message.lastChunk != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - 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())); - 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()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.sourceClusterId != null && message.hasOwnProperty("sourceClusterId")) - if (!$util.isString(message.sourceClusterId)) - return "sourceClusterId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp); - if (error) - return "commitTimestamp." + error; - } - if (message.tiebreaker != null && message.hasOwnProperty("tiebreaker")) - if (!$util.isInteger(message.tiebreaker)) - return "tiebreaker: integer expected"; - if (message.chunks != null && message.hasOwnProperty("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]); - if (error) - return "chunks." + error; - } - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { - var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange) - return object; - 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 (typeof object.commitTimestamp !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.commitTimestamp: object expected"); - message.commitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.commitTimestamp); - } - 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 (typeof object.chunks[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.chunks: object expected"); - message.chunks[i] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.fromObject(object.chunks[i]); - } - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.token != null) - message.token = String(object.token); - if (object.estimatedLowWatermark != null) { - if (typeof object.estimatedLowWatermark !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.estimatedLowWatermark: object expected"); - message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark); - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("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 && message.hasOwnProperty("sourceClusterId")) - object.sourceClusterId = message.sourceClusterId; - if (message.rowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("commitTimestamp")) - object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options); - if (message.tiebreaker != null && message.hasOwnProperty("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); - } - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.token != null && message.hasOwnProperty("token")) - object.token = message.token; - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) - object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32()); - break; - } - case 2: { - message.estimatedLowWatermark = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) { - var error = $root.google.bigtable.v2.StreamContinuationToken.verify(message.continuationToken); - if (error) - return "continuationToken." + error; - } - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { - var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) - return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(); - if (object.continuationToken != null) { - if (typeof object.continuationToken !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.continuationToken: object expected"); - message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationToken); - } - if (object.estimatedLowWatermark != null) { - if (typeof object.estimatedLowWatermark !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.estimatedLowWatermark: object expected"); - message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.continuationToken = null; - object.estimatedLowWatermark = null; - } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) - object.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationToken, options); - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) - object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.continuationTokens && message.continuationTokens.length)) - message.continuationTokens = []; - message.continuationTokens.push($root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.newPartitions && message.newPartitions.length)) - message.newPartitions = []; - message.newPartitions.push($root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - if (error) - return "status." + error; - } - if (message.continuationTokens != null && message.hasOwnProperty("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]); - if (error) - return "continuationTokens." + error; - } - } - if (message.newPartitions != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) - return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(); - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); - } - 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 (typeof object.continuationTokens[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.continuationTokens: object expected"); - message.continuationTokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationTokens[i]); - } - } - 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 (typeof object.newPartitions[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newPartitions: object expected"); - message.newPartitions[i] = $root.google.bigtable.v2.StreamPartition.fromObject(object.newPartitions[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.continuationTokens = []; - object.newPartitions = []; - } - if (options.defaults) - object.status = null; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); - 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); - } - 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); - } - 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 {google.bigtable.v2.IProtoFormat|null} [protoFormat] ExecuteQueryRequest protoFormat - * @property {Uint8Array|null} [resumeToken] ExecuteQueryRequest resumeToken - * @property {Object.|null} [params] ExecuteQueryRequest params - */ - - /** - * 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 = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - 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 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; - - // 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).ldelim().ldelim(); - } - if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.resumeToken); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - 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()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.params[key] = value; - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.instanceName != null && message.hasOwnProperty("instanceName")) - if (!$util.isString(message.instanceName)) - return "instanceName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { - properties.dataFormat = 1; - { - var error = $root.google.bigtable.v2.ProtoFormat.verify(message.protoFormat); - if (error) - return "protoFormat." + error; - } - } - if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) - if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) - return "resumeToken: buffer expected"; - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.bigtable.v2.Value.verify(message.params[key[i]]); - if (error) - return "params." + 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) { - if (object instanceof $root.google.bigtable.v2.ExecuteQueryRequest) - return object; - 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.protoFormat != null) { - if (typeof object.protoFormat !== "object") - throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.protoFormat: object expected"); - message.protoFormat = $root.google.bigtable.v2.ProtoFormat.fromObject(object.protoFormat); - } - 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 (typeof object.params !== "object") - 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 (typeof object.params[keys[i]] !== "object") - throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.params: object expected"); - message.params[keys[i]] = $root.google.bigtable.v2.Value.fromObject(object.params[keys[i]]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.params = {}; - 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 (message.instanceName != null && message.hasOwnProperty("instanceName")) - object.instanceName = message.instanceName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { - object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options); - 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) - object.params[keys2[j]] = $root.google.bigtable.v2.Value.toObject(message.params[keys2[j]], options); - } - if (message.resumeToken != null && message.hasOwnProperty("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; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ExecuteQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metadata = $root.google.bigtable.v2.ResultSetMetadata.decode(reader, reader.uint32()); - break; - } - case 2: { - message.results = $root.google.bigtable.v2.PartialResultSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties.response = 1; - { - var error = $root.google.bigtable.v2.ResultSetMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.results != null && message.hasOwnProperty("results")) { - if (properties.response === 1) - return "response: multiple values"; - properties.response = 1; - { - var error = $root.google.bigtable.v2.PartialResultSet.verify(message.results); - 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) { - if (object instanceof $root.google.bigtable.v2.ExecuteQueryResponse) - return object; - var message = new $root.google.bigtable.v2.ExecuteQueryResponse(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.metadata: object expected"); - message.metadata = $root.google.bigtable.v2.ResultSetMetadata.fromObject(object.metadata); - } - if (object.results != null) { - if (typeof object.results !== "object") - throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.results: object expected"); - message.results = $root.google.bigtable.v2.PartialResultSet.fromObject(object.results); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options); - if (options.oneofs) - object.response = "metadata"; - } - if (message.results != null && message.hasOwnProperty("results")) { - object.results = $root.google.bigtable.v2.PartialResultSet.toObject(message.results, options); - 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.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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.families != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.Row) - return object; - 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 (typeof object.families[i] !== "object") - throw TypeError(".google.bigtable.v2.Row.families: object expected"); - message.families[i] = $root.google.bigtable.v2.Family.fromObject(object.families[i]); - } - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Family(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.bigtable.v2.Column.verify(message.columns[i]); - 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) { - if (object instanceof $root.google.bigtable.v2.Family) - return object; - 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 (typeof object.columns[i] !== "object") - throw TypeError(".google.bigtable.v2.Family.columns: object expected"); - message.columns[i] = $root.google.bigtable.v2.Column.fromObject(object.columns[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Column(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) - return "qualifier: buffer expected"; - if (message.cells != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.Column) - return object; - 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 (typeof object.cells[i] !== "object") - throw TypeError(".google.bigtable.v2.Column.cells: object expected"); - message.cells[i] = $root.google.bigtable.v2.Cell.fromObject(object.cells[i]); - } - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Cell(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) - 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) { - if (object instanceof $root.google.bigtable.v2.Cell) - return object; - var message = new $root.google.bigtable.v2.Cell(); - if (object.timestampMicros != null) - if ($util.Long) - (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("timestampMicros")) - 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 && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 7: { - message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); - 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()); - break; - } - case 13: { - message.dateValue = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - case 4: { - message.arrayValue = $root.google.bigtable.v2.ArrayValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - var error = $root.google.bigtable.v2.Type.verify(message.type); - if (error) - return "type." + error; - } - if (message.rawValue != null && message.hasOwnProperty("rawValue")) { - properties.kind = 1; - if (!(message.rawValue && typeof message.rawValue.length === "number" || $util.isString(message.rawValue))) - return "rawValue: buffer expected"; - } - if (message.rawTimestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.intValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.floatValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("timestampValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); - if (error) - return "timestampValue." + error; - } - } - if (message.dateValue != null && message.hasOwnProperty("dateValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.type.Date.verify(message.dateValue); - if (error) - return "dateValue." + error; - } - } - if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.ArrayValue.verify(message.arrayValue); - 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) { - if (object instanceof $root.google.bigtable.v2.Value) - return object; - var message = new $root.google.bigtable.v2.Value(); - if (object.type != null) { - if (typeof object.type !== "object") - throw TypeError(".google.bigtable.v2.Value.type: object expected"); - message.type = $root.google.bigtable.v2.Type.fromObject(object.type); - } - 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)).unsigned = 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)).unsigned = 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 (typeof object.timestampValue !== "object") - throw TypeError(".google.bigtable.v2.Value.timestampValue: object expected"); - message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); - } - if (object.dateValue != null) { - if (typeof object.dateValue !== "object") - throw TypeError(".google.bigtable.v2.Value.dateValue: object expected"); - message.dateValue = $root.google.type.Date.fromObject(object.dateValue); - } - if (object.arrayValue != null) { - if (typeof object.arrayValue !== "object") - throw TypeError(".google.bigtable.v2.Value.arrayValue: object expected"); - message.arrayValue = $root.google.bigtable.v2.ArrayValue.fromObject(object.arrayValue); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.type = null; - if (message.bytesValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { - object.arrayValue = $root.google.bigtable.v2.ArrayValue.toObject(message.arrayValue, options); - if (options.oneofs) - object.kind = "arrayValue"; - } - if (message.intValue != null && message.hasOwnProperty("intValue")) { - 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 && message.hasOwnProperty("type")) - object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); - if (message.rawValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("rawTimestampMicros")) { - 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 && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.floatValue != null && message.hasOwnProperty("floatValue")) { - object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; - if (options.oneofs) - object.kind = "floatValue"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); - if (options.oneofs) - object.kind = "timestampValue"; - } - if (message.dateValue != null && message.hasOwnProperty("dateValue")) { - object.dateValue = $root.google.type.Date.toObject(message.dateValue, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ArrayValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.bigtable.v2.Value.verify(message.values[i]); - 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) { - if (object instanceof $root.google.bigtable.v2.ArrayValue) - return object; - 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 (typeof object.values[i] !== "object") - throw TypeError(".google.bigtable.v2.ArrayValue.values: object expected"); - message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.startKeyClosed != null && message.hasOwnProperty("startKeyClosed")) { - properties.startKey = 1; - if (!(message.startKeyClosed && typeof message.startKeyClosed.length === "number" || $util.isString(message.startKeyClosed))) - return "startKeyClosed: buffer expected"; - } - if (message.startKeyOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endKeyOpen")) { - properties.endKey = 1; - if (!(message.endKeyOpen && typeof message.endKeyOpen.length === "number" || $util.isString(message.endKeyOpen))) - return "endKeyOpen: buffer expected"; - } - if (message.endKeyClosed != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.RowRange) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (message.startKeyClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowKeys != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.RowSet) - return object; - 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 (typeof object.rowRanges[i] !== "object") - throw TypeError(".google.bigtable.v2.RowSet.rowRanges: object expected"); - message.rowRanges[i] = $root.google.bigtable.v2.RowRange.fromObject(object.rowRanges[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.startQualifierClosed != null && message.hasOwnProperty("startQualifierClosed")) { - properties.startQualifier = 1; - if (!(message.startQualifierClosed && typeof message.startQualifierClosed.length === "number" || $util.isString(message.startQualifierClosed))) - return "startQualifierClosed: buffer expected"; - } - if (message.startQualifierOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endQualifierClosed")) { - properties.endQualifier = 1; - if (!(message.endQualifierClosed && typeof message.endQualifierClosed.length === "number" || $util.isString(message.endQualifierClosed))) - return "endQualifierClosed: buffer expected"; - } - if (message.endQualifierOpen != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.ColumnRange) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.familyName = ""; - if (message.familyName != null && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.startQualifierClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.TimestampRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startTimestampMicros = reader.int64(); - break; - } - case 2: { - message.endTimestampMicros = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTimestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.TimestampRange) - return object; - var message = new $root.google.bigtable.v2.TimestampRange(); - if (object.startTimestampMicros != null) - if ($util.Long) - (message.startTimestampMicros = $util.Long.fromValue(object.startTimestampMicros)).unsigned = 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)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.startTimestampMicros = options.longs === String ? "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() : long; - } else - object.endTimestampMicros = options.longs === String ? "0" : 0; - } - if (message.startTimestampMicros != null && message.hasOwnProperty("startTimestampMicros")) - 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 && message.hasOwnProperty("endTimestampMicros")) - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ValueRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.startValueClosed != null && message.hasOwnProperty("startValueClosed")) { - properties.startValue = 1; - if (!(message.startValueClosed && typeof message.startValueClosed.length === "number" || $util.isString(message.startValueClosed))) - return "startValueClosed: buffer expected"; - } - if (message.startValueOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endValueClosed")) { - properties.endValue = 1; - if (!(message.endValueClosed && typeof message.endValueClosed.length === "number" || $util.isString(message.endValueClosed))) - return "endValueClosed: buffer expected"; - } - if (message.endValueOpen != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.ValueRange) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (message.startValueClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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.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 - */ - - /** - * 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) - 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; - - // 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"|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"]), - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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()).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()).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); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.chain = $root.google.bigtable.v2.RowFilter.Chain.decode(reader, reader.uint32()); - break; - } - case 2: { - message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.decode(reader, reader.uint32()); - break; - } - case 3: { - message.condition = $root.google.bigtable.v2.RowFilter.Condition.decode(reader, reader.uint32()); - 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()); - break; - } - case 8: { - message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.decode(reader, reader.uint32()); - break; - } - case 9: { - message.valueRegexFilter = reader.bytes(); - break; - } - case 15: { - message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.decode(reader, reader.uint32()); - 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; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.chain != null && message.hasOwnProperty("chain")) { - properties.filter = 1; - { - var error = $root.google.bigtable.v2.RowFilter.Chain.verify(message.chain); - if (error) - return "chain." + error; - } - } - if (message.interleave != null && message.hasOwnProperty("interleave")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.RowFilter.Interleave.verify(message.interleave); - if (error) - return "interleave." + error; - } - } - if (message.condition != null && message.hasOwnProperty("condition")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.RowFilter.Condition.verify(message.condition); - if (error) - return "condition." + error; - } - } - if (message.sink != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("columnRangeFilter")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.ColumnRange.verify(message.columnRangeFilter); - if (error) - return "columnRangeFilter." + error; - } - } - if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.TimestampRange.verify(message.timestampRangeFilter); - if (error) - return "timestampRangeFilter." + error; - } - } - if (message.valueRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("valueRangeFilter")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.ValueRange.verify(message.valueRangeFilter); - if (error) - return "valueRangeFilter." + error; - } - } - if (message.cellsPerRowOffsetFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("applyLabelTransformer")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - if (!$util.isString(message.applyLabelTransformer)) - return "applyLabelTransformer: string expected"; - } - 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) { - if (object instanceof $root.google.bigtable.v2.RowFilter) - return object; - var message = new $root.google.bigtable.v2.RowFilter(); - if (object.chain != null) { - if (typeof object.chain !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.chain: object expected"); - message.chain = $root.google.bigtable.v2.RowFilter.Chain.fromObject(object.chain); - } - if (object.interleave != null) { - if (typeof object.interleave !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.interleave: object expected"); - message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.fromObject(object.interleave); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.condition: object expected"); - message.condition = $root.google.bigtable.v2.RowFilter.Condition.fromObject(object.condition); - } - 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 (typeof object.columnRangeFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.columnRangeFilter: object expected"); - message.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.fromObject(object.columnRangeFilter); - } - if (object.timestampRangeFilter != null) { - if (typeof object.timestampRangeFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.timestampRangeFilter: object expected"); - message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.fromObject(object.timestampRangeFilter); - } - 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 (typeof object.valueRangeFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.valueRangeFilter: object expected"); - message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.fromObject(object.valueRangeFilter); - } - 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); - 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) { - if (!options) - options = {}; - var object = {}; - if (message.chain != null && message.hasOwnProperty("chain")) { - object.chain = $root.google.bigtable.v2.RowFilter.Chain.toObject(message.chain, options); - if (options.oneofs) - object.filter = "chain"; - } - if (message.interleave != null && message.hasOwnProperty("interleave")) { - object.interleave = $root.google.bigtable.v2.RowFilter.Interleave.toObject(message.interleave, options); - if (options.oneofs) - object.filter = "interleave"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - object.condition = $root.google.bigtable.v2.RowFilter.Condition.toObject(message.condition, options); - if (options.oneofs) - object.filter = "condition"; - } - if (message.rowKeyRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("familyNameRegexFilter")) { - object.familyNameRegexFilter = message.familyNameRegexFilter; - if (options.oneofs) - object.filter = "familyNameRegexFilter"; - } - if (message.columnQualifierRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("columnRangeFilter")) { - object.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.toObject(message.columnRangeFilter, options); - if (options.oneofs) - object.filter = "columnRangeFilter"; - } - if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { - object.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.toObject(message.timestampRangeFilter, options); - if (options.oneofs) - object.filter = "timestampRangeFilter"; - } - if (message.valueRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("cellsPerRowOffsetFilter")) { - object.cellsPerRowOffsetFilter = message.cellsPerRowOffsetFilter; - if (options.oneofs) - object.filter = "cellsPerRowOffsetFilter"; - } - if (message.cellsPerRowLimitFilter != null && message.hasOwnProperty("cellsPerRowLimitFilter")) { - object.cellsPerRowLimitFilter = message.cellsPerRowLimitFilter; - if (options.oneofs) - object.filter = "cellsPerRowLimitFilter"; - } - if (message.cellsPerColumnLimitFilter != null && message.hasOwnProperty("cellsPerColumnLimitFilter")) { - object.cellsPerColumnLimitFilter = message.cellsPerColumnLimitFilter; - if (options.oneofs) - object.filter = "cellsPerColumnLimitFilter"; - } - if (message.stripValueTransformer != null && message.hasOwnProperty("stripValueTransformer")) { - object.stripValueTransformer = message.stripValueTransformer; - if (options.oneofs) - object.filter = "stripValueTransformer"; - } - if (message.rowSampleFilter != null && message.hasOwnProperty("rowSampleFilter")) { - object.rowSampleFilter = options.json && !isFinite(message.rowSampleFilter) ? String(message.rowSampleFilter) : message.rowSampleFilter; - if (options.oneofs) - object.filter = "rowSampleFilter"; - } - if (message.valueRangeFilter != null && message.hasOwnProperty("valueRangeFilter")) { - object.valueRangeFilter = $root.google.bigtable.v2.ValueRange.toObject(message.valueRangeFilter, options); - if (options.oneofs) - object.filter = "valueRangeFilter"; - } - if (message.sink != null && message.hasOwnProperty("sink")) { - object.sink = message.sink; - if (options.oneofs) - object.filter = "sink"; - } - if (message.passAllFilter != null && message.hasOwnProperty("passAllFilter")) { - object.passAllFilter = message.passAllFilter; - if (options.oneofs) - object.filter = "passAllFilter"; - } - if (message.blockAllFilter != null && message.hasOwnProperty("blockAllFilter")) { - object.blockAllFilter = message.blockAllFilter; - if (options.oneofs) - object.filter = "blockAllFilter"; - } - if (message.applyLabelTransformer != null && message.hasOwnProperty("applyLabelTransformer")) { - object.applyLabelTransformer = message.applyLabelTransformer; - if (options.oneofs) - object.filter = "applyLabelTransformer"; - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filters != null && message.hasOwnProperty("filters")) { - if (!Array.isArray(message.filters)) - return "filters: array expected"; - for (var i = 0; i < message.filters.length; ++i) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i]); - 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) { - if (object instanceof $root.google.bigtable.v2.RowFilter.Chain) - return object; - 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 (typeof object.filters[i] !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Chain.filters: object expected"); - message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filters != null && message.hasOwnProperty("filters")) { - if (!Array.isArray(message.filters)) - return "filters: array expected"; - for (var i = 0; i < message.filters.length; ++i) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i]); - 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) { - if (object instanceof $root.google.bigtable.v2.RowFilter.Interleave) - return object; - 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 (typeof object.filters[i] !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Interleave.filters: object expected"); - message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.predicateFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - break; - } - case 2: { - message.trueFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - break; - } - case 3: { - message.falseFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter); - if (error) - return "predicateFilter." + error; - } - if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.trueFilter); - if (error) - return "trueFilter." + error; - } - if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.falseFilter); - 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) { - if (object instanceof $root.google.bigtable.v2.RowFilter.Condition) - return object; - var message = new $root.google.bigtable.v2.RowFilter.Condition(); - if (object.predicateFilter != null) { - if (typeof object.predicateFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Condition.predicateFilter: object expected"); - message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter); - } - if (object.trueFilter != null) { - if (typeof object.trueFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Condition.trueFilter: object expected"); - message.trueFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.trueFilter); - } - if (object.falseFilter != null) { - if (typeof object.falseFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Condition.falseFilter: object expected"); - message.falseFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.falseFilter); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.predicateFilter = null; - object.trueFilter = null; - object.falseFilter = null; - } - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) - object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); - if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) - object.trueFilter = $root.google.bigtable.v2.RowFilter.toObject(message.trueFilter, options); - if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) - object.falseFilter = $root.google.bigtable.v2.RowFilter.toObject(message.falseFilter, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.setCell = $root.google.bigtable.v2.Mutation.SetCell.decode(reader, reader.uint32()); - break; - } - case 5: { - message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.decode(reader, reader.uint32()); - break; - } - case 6: { - message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.decode(reader, reader.uint32()); - break; - } - case 2: { - message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.decode(reader, reader.uint32()); - break; - } - case 3: { - message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.decode(reader, reader.uint32()); - break; - } - case 4: { - message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.setCell != null && message.hasOwnProperty("setCell")) { - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.SetCell.verify(message.setCell); - if (error) - return "setCell." + error; - } - } - if (message.addToCell != null && message.hasOwnProperty("addToCell")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.AddToCell.verify(message.addToCell); - if (error) - return "addToCell." + error; - } - } - if (message.mergeToCell != null && message.hasOwnProperty("mergeToCell")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.MergeToCell.verify(message.mergeToCell); - if (error) - return "mergeToCell." + error; - } - } - if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.DeleteFromColumn.verify(message.deleteFromColumn); - if (error) - return "deleteFromColumn." + error; - } - } - if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.DeleteFromFamily.verify(message.deleteFromFamily); - if (error) - return "deleteFromFamily." + error; - } - } - if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.DeleteFromRow.verify(message.deleteFromRow); - 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) { - if (object instanceof $root.google.bigtable.v2.Mutation) - return object; - var message = new $root.google.bigtable.v2.Mutation(); - if (object.setCell != null) { - if (typeof object.setCell !== "object") - throw TypeError(".google.bigtable.v2.Mutation.setCell: object expected"); - message.setCell = $root.google.bigtable.v2.Mutation.SetCell.fromObject(object.setCell); - } - if (object.addToCell != null) { - if (typeof object.addToCell !== "object") - throw TypeError(".google.bigtable.v2.Mutation.addToCell: object expected"); - message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.fromObject(object.addToCell); - } - if (object.mergeToCell != null) { - if (typeof object.mergeToCell !== "object") - throw TypeError(".google.bigtable.v2.Mutation.mergeToCell: object expected"); - message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.fromObject(object.mergeToCell); - } - if (object.deleteFromColumn != null) { - if (typeof object.deleteFromColumn !== "object") - throw TypeError(".google.bigtable.v2.Mutation.deleteFromColumn: object expected"); - message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.fromObject(object.deleteFromColumn); - } - if (object.deleteFromFamily != null) { - if (typeof object.deleteFromFamily !== "object") - throw TypeError(".google.bigtable.v2.Mutation.deleteFromFamily: object expected"); - message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.fromObject(object.deleteFromFamily); - } - if (object.deleteFromRow != null) { - if (typeof object.deleteFromRow !== "object") - throw TypeError(".google.bigtable.v2.Mutation.deleteFromRow: object expected"); - message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.fromObject(object.deleteFromRow); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.setCell != null && message.hasOwnProperty("setCell")) { - object.setCell = $root.google.bigtable.v2.Mutation.SetCell.toObject(message.setCell, options); - if (options.oneofs) - object.mutation = "setCell"; - } - if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { - object.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.toObject(message.deleteFromColumn, options); - if (options.oneofs) - object.mutation = "deleteFromColumn"; - } - if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { - object.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.toObject(message.deleteFromFamily, options); - if (options.oneofs) - object.mutation = "deleteFromFamily"; - } - if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { - object.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.toObject(message.deleteFromRow, options); - if (options.oneofs) - object.mutation = "deleteFromRow"; - } - if (message.addToCell != null && message.hasOwnProperty("addToCell")) { - object.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.toObject(message.addToCell, options); - if (options.oneofs) - object.mutation = "addToCell"; - } - if (message.mergeToCell != null && message.hasOwnProperty("mergeToCell")) { - object.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.toObject(message.mergeToCell, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) - return "columnQualifier: buffer expected"; - if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.Mutation.SetCell) - return object; - 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)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("timestampMicros")) - 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 && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.familyName = reader.string(); - break; - } - case 2: { - message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); - break; - } - case 3: { - message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); - break; - } - case 4: { - message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { - var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier); - if (error) - return "columnQualifier." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.bigtable.v2.Value.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.input != null && message.hasOwnProperty("input")) { - var error = $root.google.bigtable.v2.Value.verify(message.input); - 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) { - if (object instanceof $root.google.bigtable.v2.Mutation.AddToCell) - return object; - var message = new $root.google.bigtable.v2.Mutation.AddToCell(); - if (object.familyName != null) - message.familyName = String(object.familyName); - if (object.columnQualifier != null) { - if (typeof object.columnQualifier !== "object") - throw TypeError(".google.bigtable.v2.Mutation.AddToCell.columnQualifier: object expected"); - message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.bigtable.v2.Mutation.AddToCell.timestamp: object expected"); - message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp); - } - if (object.input != null) { - if (typeof object.input !== "object") - throw TypeError(".google.bigtable.v2.Mutation.AddToCell.input: object expected"); - message.input = $root.google.bigtable.v2.Value.fromObject(object.input); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.familyName = ""; - object.columnQualifier = null; - object.timestamp = null; - object.input = null; - } - if (message.familyName != null && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); - if (message.input != null && message.hasOwnProperty("input")) - object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.familyName = reader.string(); - break; - } - case 2: { - message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); - break; - } - case 3: { - message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); - break; - } - case 4: { - message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { - var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier); - if (error) - return "columnQualifier." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.bigtable.v2.Value.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.input != null && message.hasOwnProperty("input")) { - var error = $root.google.bigtable.v2.Value.verify(message.input); - 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) { - if (object instanceof $root.google.bigtable.v2.Mutation.MergeToCell) - return object; - var message = new $root.google.bigtable.v2.Mutation.MergeToCell(); - if (object.familyName != null) - message.familyName = String(object.familyName); - if (object.columnQualifier != null) { - if (typeof object.columnQualifier !== "object") - throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.columnQualifier: object expected"); - message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.timestamp: object expected"); - message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp); - } - if (object.input != null) { - if (typeof object.input !== "object") - throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.input: object expected"); - message.input = $root.google.bigtable.v2.Value.fromObject(object.input); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.familyName = ""; - object.columnQualifier = null; - object.timestamp = null; - object.input = null; - } - if (message.familyName != null && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); - if (message.input != null && message.hasOwnProperty("input")) - object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) - return "columnQualifier: buffer expected"; - if (message.timeRange != null && message.hasOwnProperty("timeRange")) { - var error = $root.google.bigtable.v2.TimestampRange.verify(message.timeRange); - 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) { - if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromColumn) - return object; - 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 (typeof object.timeRange !== "object") - throw TypeError(".google.bigtable.v2.Mutation.DeleteFromColumn.timeRange: object expected"); - message.timeRange = $root.google.bigtable.v2.TimestampRange.fromObject(object.timeRange); - } - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("timeRange")) - object.timeRange = $root.google.bigtable.v2.TimestampRange.toObject(message.timeRange, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.familyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.familyName != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromFamily) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.familyName = ""; - if (message.familyName != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) - return "columnQualifier: buffer expected"; - if (message.appendValue != null && message.hasOwnProperty("appendValue")) { - properties.rule = 1; - if (!(message.appendValue && typeof message.appendValue.length === "number" || $util.isString(message.appendValue))) - return "appendValue: buffer expected"; - } - if (message.incrementAmount != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRule) - return object; - 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)).unsigned = 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("incrementAmount")) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamPartition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rowRange = $root.google.bigtable.v2.RowRange.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowRange != null && message.hasOwnProperty("rowRange")) { - var error = $root.google.bigtable.v2.RowRange.verify(message.rowRange); - 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) { - if (object instanceof $root.google.bigtable.v2.StreamPartition) - return object; - var message = new $root.google.bigtable.v2.StreamPartition(); - if (object.rowRange != null) { - if (typeof object.rowRange !== "object") - throw TypeError(".google.bigtable.v2.StreamPartition.rowRange: object expected"); - message.rowRange = $root.google.bigtable.v2.RowRange.fromObject(object.rowRange); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.rowRange = null; - if (message.rowRange != null && message.hasOwnProperty("rowRange")) - object.rowRange = $root.google.bigtable.v2.RowRange.toObject(message.rowRange, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationTokens(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tokens != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.StreamContinuationTokens) - return object; - 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 (typeof object.tokens[i] !== "object") - throw TypeError(".google.bigtable.v2.StreamContinuationTokens.tokens: object expected"); - message.tokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.tokens[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationToken(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); - break; - } - case 2: { - message.token = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partition != null && message.hasOwnProperty("partition")) { - var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); - if (error) - return "partition." + error; - } - if (message.token != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.StreamContinuationToken) - return object; - var message = new $root.google.bigtable.v2.StreamContinuationToken(); - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.bigtable.v2.StreamContinuationToken.partition: object expected"); - message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.partition = null; - object.token = ""; - } - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); - if (message.token != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - var error = $root.google.bigtable.v2.Type.verify(message.type); - 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) { - if (object instanceof $root.google.bigtable.v2.ColumnMetadata) - return object; - var message = new $root.google.bigtable.v2.ColumnMetadata(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) { - if (typeof object.type !== "object") - throw TypeError(".google.bigtable.v2.ColumnMetadata.type: object expected"); - message.type = $root.google.bigtable.v2.Type.fromObject(object.type); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.bigtable.v2.ColumnMetadata.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.bigtable.v2.ColumnMetadata.verify(message.columns[i]); - 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) { - if (object instanceof $root.google.bigtable.v2.ProtoSchema) - return object; - 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 (typeof object.columns[i] !== "object") - throw TypeError(".google.bigtable.v2.ProtoSchema.columns: object expected"); - message.columns[i] = $root.google.bigtable.v2.ColumnMetadata.fromObject(object.columns[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ResultSetMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.protoSchema = $root.google.bigtable.v2.ProtoSchema.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { - properties.schema = 1; - { - var error = $root.google.bigtable.v2.ProtoSchema.verify(message.protoSchema); - 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) { - if (object instanceof $root.google.bigtable.v2.ResultSetMetadata) - return object; - var message = new $root.google.bigtable.v2.ResultSetMetadata(); - if (object.protoSchema != null) { - if (typeof object.protoSchema !== "object") - throw TypeError(".google.bigtable.v2.ResultSetMetadata.protoSchema: object expected"); - message.protoSchema = $root.google.bigtable.v2.ProtoSchema.fromObject(object.protoSchema); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { - object.protoSchema = $root.google.bigtable.v2.ProtoSchema.toObject(message.protoSchema, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoRows(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.bigtable.v2.Value.verify(message.values[i]); - 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) { - if (object instanceof $root.google.bigtable.v2.ProtoRows) - return object; - 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 (typeof object.values[i] !== "object") - throw TypeError(".google.bigtable.v2.ProtoRows.values: object expected"); - message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoRowsBatch(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.batchData = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.batchData != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.ProtoRowsBatch) - return object; - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("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 {Uint8Array|null} [resumeToken] PartialResultSet resumeToken - * @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) - 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 resumeToken. - * @member {Uint8Array} resumeToken - * @memberof google.bigtable.v2.PartialResultSet - * @instance - */ - PartialResultSet.prototype.resumeToken = $util.newBuffer([]); - - /** - * 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) - }); - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PartialResultSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.decode(reader, reader.uint32()); - break; - } - case 5: { - message.resumeToken = reader.bytes(); - break; - } - case 4: { - message.estimatedBatchSize = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.protoRowsBatch != null && message.hasOwnProperty("protoRowsBatch")) { - properties.partialRows = 1; - { - var error = $root.google.bigtable.v2.ProtoRowsBatch.verify(message.protoRowsBatch); - if (error) - return "protoRowsBatch." + error; - } - } - if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) - if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) - return "resumeToken: buffer expected"; - if (message.estimatedBatchSize != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.PartialResultSet) - return object; - var message = new $root.google.bigtable.v2.PartialResultSet(); - if (object.protoRowsBatch != null) { - if (typeof object.protoRowsBatch !== "object") - throw TypeError(".google.bigtable.v2.PartialResultSet.protoRowsBatch: object expected"); - message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.fromObject(object.protoRowsBatch); - } - 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.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) { - if (!options) - options = {}; - 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); - } - } - if (message.protoRowsBatch != null && message.hasOwnProperty("protoRowsBatch")) { - object.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.toObject(message.protoRowsBatch, options); - if (options.oneofs) - object.partialRows = "protoRowsBatch"; - } - if (message.estimatedBatchSize != null && message.hasOwnProperty("estimatedBatchSize")) - object.estimatedBatchSize = message.estimatedBatchSize; - if (message.resumeToken != null && message.hasOwnProperty("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; - 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.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 - */ - - /** - * 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) - 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; - - // 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"|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"]), - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bytesType = $root.google.bigtable.v2.Type.Bytes.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stringType = $root.google.bigtable.v2.Type.String.decode(reader, reader.uint32()); - break; - } - case 5: { - message.int64Type = $root.google.bigtable.v2.Type.Int64.decode(reader, reader.uint32()); - break; - } - case 12: { - message.float32Type = $root.google.bigtable.v2.Type.Float32.decode(reader, reader.uint32()); - break; - } - case 9: { - message.float64Type = $root.google.bigtable.v2.Type.Float64.decode(reader, reader.uint32()); - break; - } - case 8: { - message.boolType = $root.google.bigtable.v2.Type.Bool.decode(reader, reader.uint32()); - break; - } - case 10: { - message.timestampType = $root.google.bigtable.v2.Type.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.dateType = $root.google.bigtable.v2.Type.Date.decode(reader, reader.uint32()); - break; - } - case 6: { - message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.decode(reader, reader.uint32()); - break; - } - case 7: { - message.structType = $root.google.bigtable.v2.Type.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.arrayType = $root.google.bigtable.v2.Type.Array.decode(reader, reader.uint32()); - break; - } - case 4: { - message.mapType = $root.google.bigtable.v2.Type.Map.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType); - if (error) - return "bytesType." + error; - } - } - if (message.stringType != null && message.hasOwnProperty("stringType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.String.verify(message.stringType); - if (error) - return "stringType." + error; - } - } - if (message.int64Type != null && message.hasOwnProperty("int64Type")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Int64.verify(message.int64Type); - if (error) - return "int64Type." + error; - } - } - if (message.float32Type != null && message.hasOwnProperty("float32Type")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Float32.verify(message.float32Type); - if (error) - return "float32Type." + error; - } - } - if (message.float64Type != null && message.hasOwnProperty("float64Type")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Float64.verify(message.float64Type); - if (error) - return "float64Type." + error; - } - } - if (message.boolType != null && message.hasOwnProperty("boolType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Bool.verify(message.boolType); - if (error) - return "boolType." + error; - } - } - if (message.timestampType != null && message.hasOwnProperty("timestampType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Timestamp.verify(message.timestampType); - if (error) - return "timestampType." + error; - } - } - if (message.dateType != null && message.hasOwnProperty("dateType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Date.verify(message.dateType); - if (error) - return "dateType." + error; - } - } - if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Aggregate.verify(message.aggregateType); - if (error) - return "aggregateType." + error; - } - } - if (message.structType != null && message.hasOwnProperty("structType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Struct.verify(message.structType); - if (error) - return "structType." + error; - } - } - if (message.arrayType != null && message.hasOwnProperty("arrayType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Array.verify(message.arrayType); - if (error) - return "arrayType." + error; - } - } - if (message.mapType != null && message.hasOwnProperty("mapType")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.bigtable.v2.Type.Map.verify(message.mapType); - if (error) - return "mapType." + 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) { - if (object instanceof $root.google.bigtable.v2.Type) - return object; - var message = new $root.google.bigtable.v2.Type(); - if (object.bytesType != null) { - if (typeof object.bytesType !== "object") - throw TypeError(".google.bigtable.v2.Type.bytesType: object expected"); - message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType); - } - if (object.stringType != null) { - if (typeof object.stringType !== "object") - throw TypeError(".google.bigtable.v2.Type.stringType: object expected"); - message.stringType = $root.google.bigtable.v2.Type.String.fromObject(object.stringType); - } - if (object.int64Type != null) { - if (typeof object.int64Type !== "object") - throw TypeError(".google.bigtable.v2.Type.int64Type: object expected"); - message.int64Type = $root.google.bigtable.v2.Type.Int64.fromObject(object.int64Type); - } - if (object.float32Type != null) { - if (typeof object.float32Type !== "object") - throw TypeError(".google.bigtable.v2.Type.float32Type: object expected"); - message.float32Type = $root.google.bigtable.v2.Type.Float32.fromObject(object.float32Type); - } - if (object.float64Type != null) { - if (typeof object.float64Type !== "object") - throw TypeError(".google.bigtable.v2.Type.float64Type: object expected"); - message.float64Type = $root.google.bigtable.v2.Type.Float64.fromObject(object.float64Type); - } - if (object.boolType != null) { - if (typeof object.boolType !== "object") - throw TypeError(".google.bigtable.v2.Type.boolType: object expected"); - message.boolType = $root.google.bigtable.v2.Type.Bool.fromObject(object.boolType); - } - if (object.timestampType != null) { - if (typeof object.timestampType !== "object") - throw TypeError(".google.bigtable.v2.Type.timestampType: object expected"); - message.timestampType = $root.google.bigtable.v2.Type.Timestamp.fromObject(object.timestampType); - } - if (object.dateType != null) { - if (typeof object.dateType !== "object") - throw TypeError(".google.bigtable.v2.Type.dateType: object expected"); - message.dateType = $root.google.bigtable.v2.Type.Date.fromObject(object.dateType); - } - if (object.aggregateType != null) { - if (typeof object.aggregateType !== "object") - throw TypeError(".google.bigtable.v2.Type.aggregateType: object expected"); - message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.fromObject(object.aggregateType); - } - if (object.structType != null) { - if (typeof object.structType !== "object") - throw TypeError(".google.bigtable.v2.Type.structType: object expected"); - message.structType = $root.google.bigtable.v2.Type.Struct.fromObject(object.structType); - } - if (object.arrayType != null) { - if (typeof object.arrayType !== "object") - throw TypeError(".google.bigtable.v2.Type.arrayType: object expected"); - message.arrayType = $root.google.bigtable.v2.Type.Array.fromObject(object.arrayType); - } - if (object.mapType != null) { - if (typeof object.mapType !== "object") - throw TypeError(".google.bigtable.v2.Type.mapType: object expected"); - message.mapType = $root.google.bigtable.v2.Type.Map.fromObject(object.mapType); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { - object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options); - if (options.oneofs) - object.kind = "bytesType"; - } - if (message.stringType != null && message.hasOwnProperty("stringType")) { - object.stringType = $root.google.bigtable.v2.Type.String.toObject(message.stringType, options); - if (options.oneofs) - object.kind = "stringType"; - } - if (message.arrayType != null && message.hasOwnProperty("arrayType")) { - object.arrayType = $root.google.bigtable.v2.Type.Array.toObject(message.arrayType, options); - if (options.oneofs) - object.kind = "arrayType"; - } - if (message.mapType != null && message.hasOwnProperty("mapType")) { - object.mapType = $root.google.bigtable.v2.Type.Map.toObject(message.mapType, options); - if (options.oneofs) - object.kind = "mapType"; - } - if (message.int64Type != null && message.hasOwnProperty("int64Type")) { - object.int64Type = $root.google.bigtable.v2.Type.Int64.toObject(message.int64Type, options); - if (options.oneofs) - object.kind = "int64Type"; - } - if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { - object.aggregateType = $root.google.bigtable.v2.Type.Aggregate.toObject(message.aggregateType, options); - if (options.oneofs) - object.kind = "aggregateType"; - } - if (message.structType != null && message.hasOwnProperty("structType")) { - object.structType = $root.google.bigtable.v2.Type.Struct.toObject(message.structType, options); - if (options.oneofs) - object.kind = "structType"; - } - if (message.boolType != null && message.hasOwnProperty("boolType")) { - object.boolType = $root.google.bigtable.v2.Type.Bool.toObject(message.boolType, options); - if (options.oneofs) - object.kind = "boolType"; - } - if (message.float64Type != null && message.hasOwnProperty("float64Type")) { - object.float64Type = $root.google.bigtable.v2.Type.Float64.toObject(message.float64Type, options); - if (options.oneofs) - object.kind = "float64Type"; - } - if (message.timestampType != null && message.hasOwnProperty("timestampType")) { - object.timestampType = $root.google.bigtable.v2.Type.Timestamp.toObject(message.timestampType, options); - if (options.oneofs) - object.kind = "timestampType"; - } - if (message.dateType != null && message.hasOwnProperty("dateType")) { - object.dateType = $root.google.bigtable.v2.Type.Date.toObject(message.dateType, options); - if (options.oneofs) - object.kind = "dateType"; - } - if (message.float32Type != null && message.hasOwnProperty("float32Type")) { - object.float32Type = $root.google.bigtable.v2.Type.Float32.toObject(message.float32Type, options); - if (options.oneofs) - object.kind = "float32Type"; - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { - var error = $root.google.bigtable.v2.Type.Bytes.Encoding.verify(message.encoding); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Bytes) - return object; - var message = new $root.google.bigtable.v2.Type.Bytes(); - if (object.encoding != null) { - if (typeof object.encoding !== "object") - throw TypeError(".google.bigtable.v2.Type.Bytes.encoding: object expected"); - message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.fromObject(object.encoding); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.toObject(message.encoding, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.raw != null && message.hasOwnProperty("raw")) { - properties.encoding = 1; - { - var error = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.verify(message.raw); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding) - return object; - var message = new $root.google.bigtable.v2.Type.Bytes.Encoding(); - if (object.raw != null) { - if (typeof object.raw !== "object") - throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding.raw: object expected"); - message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.fromObject(object.raw); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.raw != null && message.hasOwnProperty("raw")) { - object.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options); - 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 - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object 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) { - if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding.Raw) - return object; - return new $root.google.bigtable.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.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() { - return {}; - }; - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.encoding = $root.google.bigtable.v2.Type.String.Encoding.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { - var error = $root.google.bigtable.v2.Type.String.Encoding.verify(message.encoding); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.String) - return object; - var message = new $root.google.bigtable.v2.Type.String(); - if (object.encoding != null) { - if (typeof object.encoding !== "object") - throw TypeError(".google.bigtable.v2.Type.String.encoding: object expected"); - message.encoding = $root.google.bigtable.v2.Type.String.Encoding.fromObject(object.encoding); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.v2.Type.String.Encoding.toObject(message.encoding, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.decode(reader, reader.uint32()); - break; - } - case 2: { - message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { - properties.encoding = 1; - { - var error = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw); - if (error) - return "utf8Raw." + error; - } - } - if (message.utf8Bytes != null && message.hasOwnProperty("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); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.String.Encoding) - return object; - var message = new $root.google.bigtable.v2.Type.String.Encoding(); - if (object.utf8Raw != null) { - if (typeof object.utf8Raw !== "object") - throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Raw: object expected"); - message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.fromObject(object.utf8Raw); - } - if (object.utf8Bytes != null) { - if (typeof object.utf8Bytes !== "object") - throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Bytes: object expected"); - message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.fromObject(object.utf8Bytes); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { - object.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options); - if (options.oneofs) - object.encoding = "utf8Raw"; - } - if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { - object.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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 - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object 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) { - if (object instanceof $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) - return object; - return new $root.google.bigtable.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.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() { - return {}; - }; - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { - var error = $root.google.bigtable.v2.Type.Int64.Encoding.verify(message.encoding); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Int64) - return object; - var message = new $root.google.bigtable.v2.Type.Int64(); - if (object.encoding != null) { - if (typeof object.encoding !== "object") - throw TypeError(".google.bigtable.v2.Type.Int64.encoding: object expected"); - message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.fromObject(object.encoding); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.encoding, options); - 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 - */ - - /** - * 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) - 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; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Encoding encoding. - * @member {"bigEndianBytes"|undefined} encoding - * @memberof google.bigtable.v2.Type.Int64.Encoding - * @instance - */ - Object.defineProperty(Encoding.prototype, "encoding", { - get: $util.oneOfGetter($oneOfFields = ["bigEndianBytes"]), - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { - properties.encoding = 1; - { - var error = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes); - if (error) - return "bigEndianBytes." + 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) { - if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding) - return object; - var message = new $root.google.bigtable.v2.Type.Int64.Encoding(); - if (object.bigEndianBytes != null) { - if (typeof object.bigEndianBytes !== "object") - throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.bigEndianBytes: object expected"); - message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.fromObject(object.bigEndianBytes); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { - object.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options); - if (options.oneofs) - object.encoding = "bigEndianBytes"; - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.bytesType = $root.google.bigtable.v2.Type.Bytes.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { - var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) - return object; - var message = new $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes(); - if (object.bytesType != null) { - if (typeof object.bytesType !== "object") - throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytesType: object expected"); - message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bytesType = null; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) - object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options); - 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; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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 - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Timestamp) - return object; - return new $root.google.bigtable.v2.Type.Timestamp(); - }; - - /** - * 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() { - return {}; - }; - - /** - * 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"; - }; - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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 - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Array.} fields - * @memberof google.bigtable.v2.Type.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyArray; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.bigtable.v2.Type.Struct.Field.verify(message.fields[i]); - if (error) - return "fields." + 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) { - if (object instanceof $root.google.bigtable.v2.Type.Struct) - return object; - 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 (typeof object.fields[i] !== "object") - throw TypeError(".google.bigtable.v2.Type.Struct.fields: object expected"); - message.fields[i] = $root.google.bigtable.v2.Type.Struct.Field.fromObject(object.fields[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 2: { - message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - var error = $root.google.bigtable.v2.Type.verify(message.type); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Struct.Field) - return object; - var message = new $root.google.bigtable.v2.Type.Struct.Field(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.type != null) { - if (typeof object.type !== "object") - throw TypeError(".google.bigtable.v2.Type.Struct.Field.type: object expected"); - message.type = $root.google.bigtable.v2.Type.fromObject(object.type); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldName = ""; - object.type = null; - } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); - 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; - })(); - - return Struct; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.elementType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.elementType != null && message.hasOwnProperty("elementType")) { - var error = $root.google.bigtable.v2.Type.verify(message.elementType); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Array) - return object; - var message = new $root.google.bigtable.v2.Type.Array(); - if (object.elementType != null) { - if (typeof object.elementType !== "object") - throw TypeError(".google.bigtable.v2.Type.Array.elementType: object expected"); - message.elementType = $root.google.bigtable.v2.Type.fromObject(object.elementType); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.elementType = null; - if (message.elementType != null && message.hasOwnProperty("elementType")) - object.elementType = $root.google.bigtable.v2.Type.toObject(message.elementType, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.keyType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); - break; - } - case 2: { - message.valueType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) { - var error = $root.google.bigtable.v2.Type.verify(message.keyType); - if (error) - return "keyType." + error; - } - if (message.valueType != null && message.hasOwnProperty("valueType")) { - var error = $root.google.bigtable.v2.Type.verify(message.valueType); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Map) - return object; - var message = new $root.google.bigtable.v2.Type.Map(); - if (object.keyType != null) { - if (typeof object.keyType !== "object") - throw TypeError(".google.bigtable.v2.Type.Map.keyType: object expected"); - message.keyType = $root.google.bigtable.v2.Type.fromObject(object.keyType); - } - if (object.valueType != null) { - if (typeof object.valueType !== "object") - throw TypeError(".google.bigtable.v2.Type.Map.valueType: object expected"); - message.valueType = $root.google.bigtable.v2.Type.fromObject(object.valueType); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyType = null; - object.valueType = null; - } - if (message.keyType != null && message.hasOwnProperty("keyType")) - object.keyType = $root.google.bigtable.v2.Type.toObject(message.keyType, options); - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = $root.google.bigtable.v2.Type.toObject(message.valueType, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.inputType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stateType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.decode(reader, reader.uint32()); - break; - } - case 5: { - message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.decode(reader, reader.uint32()); - break; - } - case 6: { - message.max = $root.google.bigtable.v2.Type.Aggregate.Max.decode(reader, reader.uint32()); - break; - } - case 7: { - message.min = $root.google.bigtable.v2.Type.Aggregate.Min.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.inputType != null && message.hasOwnProperty("inputType")) { - var error = $root.google.bigtable.v2.Type.verify(message.inputType); - if (error) - return "inputType." + error; - } - if (message.stateType != null && message.hasOwnProperty("stateType")) { - var error = $root.google.bigtable.v2.Type.verify(message.stateType); - if (error) - return "stateType." + error; - } - if (message.sum != null && message.hasOwnProperty("sum")) { - properties.aggregator = 1; - { - var error = $root.google.bigtable.v2.Type.Aggregate.Sum.verify(message.sum); - if (error) - return "sum." + error; - } - } - if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { - if (properties.aggregator === 1) - return "aggregator: multiple values"; - properties.aggregator = 1; - { - var error = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify(message.hllppUniqueCount); - if (error) - return "hllppUniqueCount." + error; - } - } - if (message.max != null && message.hasOwnProperty("max")) { - if (properties.aggregator === 1) - return "aggregator: multiple values"; - properties.aggregator = 1; - { - var error = $root.google.bigtable.v2.Type.Aggregate.Max.verify(message.max); - if (error) - return "max." + error; - } - } - if (message.min != null && message.hasOwnProperty("min")) { - if (properties.aggregator === 1) - return "aggregator: multiple values"; - properties.aggregator = 1; - { - var error = $root.google.bigtable.v2.Type.Aggregate.Min.verify(message.min); - 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) { - if (object instanceof $root.google.bigtable.v2.Type.Aggregate) - return object; - var message = new $root.google.bigtable.v2.Type.Aggregate(); - if (object.inputType != null) { - if (typeof object.inputType !== "object") - throw TypeError(".google.bigtable.v2.Type.Aggregate.inputType: object expected"); - message.inputType = $root.google.bigtable.v2.Type.fromObject(object.inputType); - } - if (object.stateType != null) { - if (typeof object.stateType !== "object") - throw TypeError(".google.bigtable.v2.Type.Aggregate.stateType: object expected"); - message.stateType = $root.google.bigtable.v2.Type.fromObject(object.stateType); - } - if (object.sum != null) { - if (typeof object.sum !== "object") - throw TypeError(".google.bigtable.v2.Type.Aggregate.sum: object expected"); - message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.fromObject(object.sum); - } - if (object.hllppUniqueCount != null) { - if (typeof object.hllppUniqueCount !== "object") - throw TypeError(".google.bigtable.v2.Type.Aggregate.hllppUniqueCount: object expected"); - message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount); - } - if (object.max != null) { - if (typeof object.max !== "object") - throw TypeError(".google.bigtable.v2.Type.Aggregate.max: object expected"); - message.max = $root.google.bigtable.v2.Type.Aggregate.Max.fromObject(object.max); - } - if (object.min != null) { - if (typeof object.min !== "object") - throw TypeError(".google.bigtable.v2.Type.Aggregate.min: object expected"); - message.min = $root.google.bigtable.v2.Type.Aggregate.Min.fromObject(object.min); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.inputType = null; - object.stateType = null; - } - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = $root.google.bigtable.v2.Type.toObject(message.inputType, options); - if (message.stateType != null && message.hasOwnProperty("stateType")) - object.stateType = $root.google.bigtable.v2.Type.toObject(message.stateType, options); - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.toObject(message.sum, options); - if (options.oneofs) - object.aggregator = "sum"; - } - if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { - object.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options); - if (options.oneofs) - object.aggregator = "hllppUniqueCount"; - } - if (message.max != null && message.hasOwnProperty("max")) { - object.max = $root.google.bigtable.v2.Type.Aggregate.Max.toObject(message.max, options); - if (options.oneofs) - object.aggregator = "max"; - } - if (message.min != null && message.hasOwnProperty("min")) { - object.min = $root.google.bigtable.v2.Type.Aggregate.Min.toObject(message.min, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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) { - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadIterationStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowsSeenCount != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.bigtable.v2.ReadIterationStats) - return object; - var message = new $root.google.bigtable.v2.ReadIterationStats(); - if (object.rowsSeenCount != null) - if ($util.Long) - (message.rowsSeenCount = $util.Long.fromValue(object.rowsSeenCount)).unsigned = 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)).unsigned = 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)).unsigned = 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)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.rowsSeenCount = options.longs === String ? "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() : long; - } else - object.rowsReturnedCount = options.longs === String ? "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() : long; - } else - object.cellsSeenCount = options.longs === String ? "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() : long; - } else - object.cellsReturnedCount = options.longs === String ? "0" : 0; - } - if (message.rowsSeenCount != null && message.hasOwnProperty("rowsSeenCount")) - 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 && message.hasOwnProperty("rowsReturnedCount")) - 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 && message.hasOwnProperty("cellsSeenCount")) - 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 && message.hasOwnProperty("cellsReturnedCount")) - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.frontendServerLatency != null && Object.hasOwnProperty.call(message, "frontendServerLatency")) - $root.google.protobuf.Duration.encode(message.frontendServerLatency, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RequestLatencyStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.frontendServerLatency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.frontendServerLatency != null && message.hasOwnProperty("frontendServerLatency")) { - var error = $root.google.protobuf.Duration.verify(message.frontendServerLatency); - 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) { - if (object instanceof $root.google.bigtable.v2.RequestLatencyStats) - return object; - var message = new $root.google.bigtable.v2.RequestLatencyStats(); - if (object.frontendServerLatency != null) { - if (typeof object.frontendServerLatency !== "object") - throw TypeError(".google.bigtable.v2.RequestLatencyStats.frontendServerLatency: object expected"); - message.frontendServerLatency = $root.google.protobuf.Duration.fromObject(object.frontendServerLatency); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.frontendServerLatency = null; - if (message.frontendServerLatency != null && message.hasOwnProperty("frontendServerLatency")) - object.frontendServerLatency = $root.google.protobuf.Duration.toObject(message.frontendServerLatency, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.FullReadStatsView(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.readIterationStats != null && message.hasOwnProperty("readIterationStats")) { - var error = $root.google.bigtable.v2.ReadIterationStats.verify(message.readIterationStats); - if (error) - return "readIterationStats." + error; - } - if (message.requestLatencyStats != null && message.hasOwnProperty("requestLatencyStats")) { - var error = $root.google.bigtable.v2.RequestLatencyStats.verify(message.requestLatencyStats); - 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) { - if (object instanceof $root.google.bigtable.v2.FullReadStatsView) - return object; - var message = new $root.google.bigtable.v2.FullReadStatsView(); - if (object.readIterationStats != null) { - if (typeof object.readIterationStats !== "object") - throw TypeError(".google.bigtable.v2.FullReadStatsView.readIterationStats: object expected"); - message.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.fromObject(object.readIterationStats); - } - if (object.requestLatencyStats != null) { - if (typeof object.requestLatencyStats !== "object") - throw TypeError(".google.bigtable.v2.FullReadStatsView.requestLatencyStats: object expected"); - message.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.fromObject(object.requestLatencyStats); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.readIterationStats = null; - object.requestLatencyStats = null; - } - if (message.readIterationStats != null && message.hasOwnProperty("readIterationStats")) - object.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.toObject(message.readIterationStats, options); - if (message.requestLatencyStats != null && message.hasOwnProperty("requestLatencyStats")) - object.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.toObject(message.requestLatencyStats, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RequestStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fullReadStatsView != null && message.hasOwnProperty("fullReadStatsView")) { - properties.statsView = 1; - { - var error = $root.google.bigtable.v2.FullReadStatsView.verify(message.fullReadStatsView); - 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) { - if (object instanceof $root.google.bigtable.v2.RequestStats) - return object; - var message = new $root.google.bigtable.v2.RequestStats(); - if (object.fullReadStatsView != null) { - if (typeof object.fullReadStatsView !== "object") - throw TypeError(".google.bigtable.v2.RequestStats.fullReadStatsView: object expected"); - message.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.fromObject(object.fullReadStatsView); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (message.fullReadStatsView != null && message.hasOwnProperty("fullReadStatsView")) { - object.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.toObject(message.fullReadStatsView, options); - 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; - })(); - - 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 - */ - - /** - * 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) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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); - return writer; - }; - - /** - * Encodes the specified FeatureFlags message, length delimited. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.bigtable.v2.FeatureFlags - * @static - * @param {google.bigtable.v2.IFeatureFlags} message FeatureFlags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureFlags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureFlags message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.v2.FeatureFlags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureFlags.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.FeatureFlags(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureFlags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.bigtable.v2.FeatureFlags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureFlags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureFlags message. - * @function verify - * @memberof google.bigtable.v2.FeatureFlags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureFlags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reverseScans != null && message.hasOwnProperty("reverseScans")) - if (typeof message.reverseScans !== "boolean") - return "reverseScans: boolean expected"; - if (message.mutateRowsRateLimit != null && message.hasOwnProperty("mutateRowsRateLimit")) - if (typeof message.mutateRowsRateLimit !== "boolean") - return "mutateRowsRateLimit: boolean expected"; - if (message.mutateRowsRateLimit2 != null && message.hasOwnProperty("mutateRowsRateLimit2")) - if (typeof message.mutateRowsRateLimit2 !== "boolean") - return "mutateRowsRateLimit2: boolean expected"; - if (message.lastScannedRowResponses != null && message.hasOwnProperty("lastScannedRowResponses")) - if (typeof message.lastScannedRowResponses !== "boolean") - return "lastScannedRowResponses: boolean expected"; - if (message.routingCookie != null && message.hasOwnProperty("routingCookie")) - if (typeof message.routingCookie !== "boolean") - return "routingCookie: boolean expected"; - if (message.retryInfo != null && message.hasOwnProperty("retryInfo")) - if (typeof message.retryInfo !== "boolean") - return "retryInfo: boolean expected"; - if (message.clientSideMetricsEnabled != null && message.hasOwnProperty("clientSideMetricsEnabled")) - if (typeof message.clientSideMetricsEnabled !== "boolean") - return "clientSideMetricsEnabled: boolean expected"; - return null; - }; - - /** - * Creates a FeatureFlags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.bigtable.v2.FeatureFlags - * @static - * @param {Object.} object Plain object - * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags - */ - FeatureFlags.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.FeatureFlags) - return object; - var message = new $root.google.bigtable.v2.FeatureFlags(); - if (object.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); - return message; - }; - - /** - * Creates a plain object from a FeatureFlags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.bigtable.v2.FeatureFlags - * @static - * @param {google.bigtable.v2.FeatureFlags} message FeatureFlags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureFlags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.reverseScans = false; - object.mutateRowsRateLimit = false; - object.lastScannedRowResponses = false; - object.mutateRowsRateLimit2 = false; - object.routingCookie = false; - object.retryInfo = false; - object.clientSideMetricsEnabled = false; - } - if (message.reverseScans != null && message.hasOwnProperty("reverseScans")) - object.reverseScans = message.reverseScans; - if (message.mutateRowsRateLimit != null && message.hasOwnProperty("mutateRowsRateLimit")) - object.mutateRowsRateLimit = message.mutateRowsRateLimit; - if (message.lastScannedRowResponses != null && message.hasOwnProperty("lastScannedRowResponses")) - object.lastScannedRowResponses = message.lastScannedRowResponses; - if (message.mutateRowsRateLimit2 != null && message.hasOwnProperty("mutateRowsRateLimit2")) - object.mutateRowsRateLimit2 = message.mutateRowsRateLimit2; - if (message.routingCookie != null && message.hasOwnProperty("routingCookie")) - object.routingCookie = message.routingCookie; - if (message.retryInfo != null && message.hasOwnProperty("retryInfo")) - object.retryInfo = message.retryInfo; - if (message.clientSideMetricsEnabled != null && message.hasOwnProperty("clientSideMetricsEnabled")) - object.clientSideMetricsEnabled = message.clientSideMetricsEnabled; - return object; - }; - - /** - * Converts this FeatureFlags to JSON. - * @function toJSON - * @memberof google.bigtable.v2.FeatureFlags - * @instance - * @returns {Object.} JSON object - */ - FeatureFlags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureFlags - * @function getTypeUrl - * @memberof google.bigtable.v2.FeatureFlags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureFlags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.bigtable.v2.FeatureFlags"; - }; - - return FeatureFlags; - })(); - - v2.ResponseParams = (function() { - - /** - * Properties of a ResponseParams. - * @memberof google.bigtable.v2 - * @interface IResponseParams - * @property {string|null} [zoneId] ResponseParams zoneId - * @property {string|null} [clusterId] ResponseParams clusterId - */ - - /** - * Constructs a new ResponseParams. - * @memberof google.bigtable.v2 - * @classdesc Represents a ResponseParams. - * @implements IResponseParams - * @constructor - * @param {google.bigtable.v2.IResponseParams=} [properties] Properties to set - */ - function ResponseParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResponseParams zoneId. - * @member {string|null|undefined} zoneId - * @memberof google.bigtable.v2.ResponseParams - * @instance - */ - ResponseParams.prototype.zoneId = null; - - /** - * ResponseParams clusterId. - * @member {string|null|undefined} clusterId - * @memberof google.bigtable.v2.ResponseParams - * @instance - */ - ResponseParams.prototype.clusterId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ResponseParams _zoneId. - * @member {"zoneId"|undefined} _zoneId - * @memberof google.bigtable.v2.ResponseParams - * @instance - */ - Object.defineProperty(ResponseParams.prototype, "_zoneId", { - get: $util.oneOfGetter($oneOfFields = ["zoneId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ResponseParams _clusterId. - * @member {"clusterId"|undefined} _clusterId - * @memberof google.bigtable.v2.ResponseParams - * @instance - */ - Object.defineProperty(ResponseParams.prototype, "_clusterId", { - get: $util.oneOfGetter($oneOfFields = ["clusterId"]), - 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) { - if (!writer) - writer = $Writer.create(); - 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); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ResponseParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.zoneId = reader.string(); - break; - } - case 2: { - message.clusterId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) { - properties._zoneId = 1; - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - } - if (message.clusterId != null && message.hasOwnProperty("clusterId")) { - properties._clusterId = 1; - if (!$util.isString(message.clusterId)) - return "clusterId: string 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) { - if (object instanceof $root.google.bigtable.v2.ResponseParams) - return object; - 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); - 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) { - if (!options) - options = {}; - var object = {}; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) { - object.zoneId = message.zoneId; - if (options.oneofs) - object._zoneId = "zoneId"; - } - if (message.clusterId != null && message.hasOwnProperty("clusterId")) { - object.clusterId = message.clusterId; - if (options.oneofs) - object._clusterId = "clusterId"; - } - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * 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) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - 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).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - 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 (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - 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); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - 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); - break; - } - } - 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); - break; - } - } - 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); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++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) - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - 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).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @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; - })(); - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RoutingRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.routingParameters && message.routingParameters.length)) - message.routingParameters = []; - message.routingParameters.push($root.google.api.RoutingParameter.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.routingParameters != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.api.RoutingRule) - return object; - 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 (typeof object.routingParameters[i] !== "object") - throw TypeError(".google.api.RoutingRule.routingParameters: object expected"); - message.routingParameters[i] = $root.google.api.RoutingParameter.fromObject(object.routingParameters[i]); - } - } - 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) { - if (!options) - options = {}; - 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); - } - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RoutingParameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.field = reader.string(); - break; - } - case 2: { - message.pathTemplate = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.field != null && message.hasOwnProperty("field")) - if (!$util.isString(message.field)) - return "field: string expected"; - if (message.pathTemplate != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.api.RoutingParameter) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.field = ""; - object.pathTemplate = ""; - } - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - if (message.pathTemplate != null && message.hasOwnProperty("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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN 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[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} [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.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {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) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - 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) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - 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_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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("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]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - 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 (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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) { - if (!options) - options = {}; - 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); - } - if (message.verification != null && message.hasOwnProperty("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 && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_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 (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 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()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.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 (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions 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.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {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 {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) - 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 uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.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()).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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - 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()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 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())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.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 (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.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[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.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); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - 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 && message.hasOwnProperty("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) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - 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_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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("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; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.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()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions 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 uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - 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).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - 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())); - 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); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".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) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".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.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 - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions 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.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; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - if (message[".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()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - case 72295729: { - message[".google.api.routing"] = $root.google.api.RoutingRule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.api.routing"] != null && message.hasOwnProperty(".google.api.routing")) { - var error = $root.google.api.RoutingRule.verify(message[".google.api.routing"]); - if (error) - return ".google.api.routing." + 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) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.api.routing"] != null) { - if (typeof object[".google.api.routing"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.routing: object expected"); - message[".google.api.routing"] = $root.google.api.RoutingRule.fromObject(object[".google.api.routing"]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - object[".google.api.routing"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - if (message[".google.api.routing"] != null && message.hasOwnProperty(".google.api.routing")) - object[".google.api.routing"] = $root.google.api.RoutingRule.toObject(message[".google.api.routing"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.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 - */ - - /** - * 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) - 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; - - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - 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) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - 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; - } - 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) { - if (!options) - options = {}; - 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; - } - if (message.fieldPresence != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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; - 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; - })(); - - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("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]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - 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 && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - 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) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - 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 (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - 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_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_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) { - if (!options) - options = {}; - 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); - } - if (message.minimumEdition != null && message.hasOwnProperty("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 && message.hasOwnProperty("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} [features] FeatureSetEditionDefault features - */ - - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = 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) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + 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) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - 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_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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("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 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - return writer; - }; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a 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) { - if (object instanceof $root.google.protobuf.FloatValue) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - 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) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - 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) { - if (object instanceof $root.google.protobuf.UInt64Value) - return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - 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) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - 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) { - if (object instanceof $root.google.protobuf.UInt32Value) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("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) { - if (object instanceof $root.google.protobuf.BoolValue) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - 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) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - 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) { - if (object instanceof $root.google.protobuf.BytesValue) - return object; - var message = new $root.google.protobuf.BytesValue(); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - 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; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - return protobuf; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Date = (function() { - - /** - * Properties of a Date. - * @memberof google.type - * @interface IDate - * @property {number|null} [year] Date year - * @property {number|null} [month] Date month - * @property {number|null} [day] Date day - */ - - /** - * Constructs a new Date. - * @memberof google.type - * @classdesc Represents a Date. - * @implements IDate - * @constructor - * @param {google.type.IDate=} [properties] Properties to set - */ - function Date(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Date year. - * @member {number} year - * @memberof google.type.Date - * @instance - */ - Date.prototype.year = 0; - - /** - * Date month. - * @member {number} month - * @memberof google.type.Date - * @instance - */ - Date.prototype.month = 0; - - /** - * Date day. - * @member {number} day - * @memberof google.type.Date - * @instance - */ - Date.prototype.day = 0; - - /** - * Creates a new Date instance using the specified properties. - * @function create - * @memberof google.type.Date - * @static - * @param {google.type.IDate=} [properties] Properties to set - * @returns {google.type.Date} Date instance - */ - Date.create = function create(properties) { - return new Date(properties); - }; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encode - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - return writer; - }; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Date message from the specified reader or buffer. - * @function decode - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.year = reader.int32(); - break; - } - case 2: { - message.month = reader.int32(); - break; - } - case 3: { - message.day = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Date message. - * @function verify - * @memberof google.type.Date - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Date.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - return null; - }; - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Date - * @static - * @param {Object.} object Plain object - * @returns {google.type.Date} Date - */ - Date.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Date) - return object; - var message = new $root.google.type.Date(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - return message; - }; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Date - * @static - * @param {google.type.Date} message Date - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Date.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - return object; - }; - - /** - * Converts this Date to JSON. - * @function toJSON - * @memberof google.type.Date - * @instance - * @returns {Object.} JSON object - */ - Date.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Date - * @function getTypeUrl - * @memberof google.type.Date - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Date"; - }; - - return Date; - })(); - - return type; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/v2/protos/protos.json b/owl-bot-staging/v2/protos/protos.json deleted file mode 100644 index dcfbd66a1..000000000 --- a/owl-bot-staging/v2/protos/protos.json +++ /dev/null @@ -1,4202 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "bigtable": { - "nested": { - "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/AuthorizedView", - "(google.api.resource_definition).pattern": "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_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/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows", - "(google.api.http).additional_bindings.body": "*", - "(google.api.routing).routing_parameters.field": "authorized_view_name", - "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", - "(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": "*" - } - } - }, - { - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - ] - } - }, - { - "(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/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys", - "(google.api.routing).routing_parameters.field": "authorized_view_name", - "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", - "(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" - } - } - }, - { - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - ] - } - }, - { - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - ] - } - }, - { - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - ] - } - }, - { - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - ] - } - }, - { - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", - "(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": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" - } - ] - } - }, - { - "(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" - } - ] - }, - "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" - } - ] - } - } - }, - "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" - } - }, - "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" - } - }, - "appProfileId": { - "type": "string", - "id": 2 - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - } - } - }, - "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": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "protoFormat": { - "type": "ProtoFormat", - "id": 4 - }, - "resumeToken": { - "type": "bytes", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "params": { - "keyType": "string", - "type": "Value", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ExecuteQueryResponse": { - "oneofs": { - "response": { - "oneof": [ - "metadata", - "results" - ] - } - }, - "fields": { - "metadata": { - "type": "ResultSetMetadata", - "id": 1 - }, - "results": { - "type": "PartialResultSet", - "id": 2 - } - } - }, - "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 - } - } - }, - "RowFilter": { - "oneofs": { - "filter": { - "oneof": [ - "chain", - "interleave", - "condition", - "sink", - "passAllFilter", - "blockAllFilter", - "rowKeyRegexFilter", - "rowSampleFilter", - "familyNameRegexFilter", - "columnQualifierRegexFilter", - "columnRangeFilter", - "timestampRangeFilter", - "valueRegexFilter", - "valueRangeFilter", - "cellsPerRowOffsetFilter", - "cellsPerRowLimitFilter", - "cellsPerColumnLimitFilter", - "stripValueTransformer", - "applyLabelTransformer" - ] - } - }, - "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 - } - }, - "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" - ] - } - }, - "fields": { - "protoRowsBatch": { - "type": "ProtoRowsBatch", - "id": 3 - }, - "resumeToken": { - "type": "bytes", - "id": 5 - }, - "estimatedBatchSize": { - "type": "int32", - "id": 4 - } - } - }, - "Type": { - "oneofs": { - "kind": { - "oneof": [ - "bytesType", - "stringType", - "int64Type", - "float32Type", - "float64Type", - "boolType", - "timestampType", - "dateType", - "aggregateType", - "structType", - "arrayType", - "mapType" - ] - } - }, - "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 - } - }, - "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" - ] - } - }, - "fields": { - "bigEndianBytes": { - "type": "BigEndianBytes", - "id": 1 - } - }, - "nested": { - "BigEndianBytes": { - "fields": { - "bytesType": { - "type": "Bytes", - "id": 1 - } - } - } - } - } - } - }, - "Bool": { - "fields": {} - }, - "Float32": { - "fields": {} - }, - "Float64": { - "fields": {} - }, - "Timestamp": { - "fields": {} - }, - "Date": { - "fields": {} - }, - "Struct": { - "fields": { - "fields": { - "rule": "repeated", - "type": "Field", - "id": 1 - } - }, - "nested": { - "Field": { - "fields": { - "fieldName": { - "type": "string", - "id": 1 - }, - "type": { - "type": "Type", - "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 - } - } - }, - "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 - } - } - }, - "ResponseParams": { - "oneofs": { - "_zoneId": { - "oneof": [ - "zoneId" - ] - }, - "_clusterId": { - "oneof": [ - "clusterId" - ] - } - }, - "fields": { - "zoneId": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "clusterId": { - "type": "string", - "id": 2, - "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", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "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 - } - } - }, - "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 - } - } - }, - "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 - } - } - }, - "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 - } - }, - "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": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "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": { - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "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 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "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": { - "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 - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "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 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "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": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "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": { - "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": { - "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": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 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 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "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 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "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 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - } - } - }, - "type": { - "options": { - "cc_enable_arenas": true, - "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" - }, - "nested": { - "Date": { - "fields": { - "year": { - "type": "int32", - "id": 1 - }, - "month": { - "type": "int32", - "id": 2 - }, - "day": { - "type": "int32", - "id": 3 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/v2/samples/generated/v2/bigtable.check_and_mutate_row.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.check_and_mutate_row.js deleted file mode 100644 index 966599ef5..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.check_and_mutate_row.js +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js deleted file mode 100644 index c89d25a15..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_row.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_row.js deleted file mode 100644 index 5d8aa3627..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_row.js +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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] - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').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/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_rows.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_rows.js deleted file mode 100644 index 5b4448f99..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.mutate_rows.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.ping_and_warm.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.ping_and_warm.js deleted file mode 100644 index 33f684935..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.ping_and_warm.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.read_change_stream.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_change_stream.js deleted file mode 100644 index 9f1b4be29..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.read_change_stream.js +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.read_modify_write_row.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_modify_write_row.js deleted file mode 100644 index b27219cfa..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.read_modify_write_row.js +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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. - */ - // const rules = [1,2,3,4] - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').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/owl-bot-staging/v2/samples/generated/v2/bigtable.read_rows.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.read_rows.js deleted file mode 100644 index e23f512cf..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.read_rows.js +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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' - /** - * 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').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/owl-bot-staging/v2/samples/generated/v2/bigtable.sample_row_keys.js b/owl-bot-staging/v2/samples/generated/v2/bigtable.sample_row_keys.js deleted file mode 100644 index 01d16cd10..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/bigtable.sample_row_keys.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'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' - /** - * 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').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/owl-bot-staging/v2/samples/generated/v2/snippet_metadata_google.bigtable.v2.json b/owl-bot-staging/v2/samples/generated/v2/snippet_metadata_google.bigtable.v2.json deleted file mode 100644 index a96efbfc8..000000000 --- a/owl-bot-staging/v2/samples/generated/v2/snippet_metadata_google.bigtable.v2.json +++ /dev/null @@ -1,571 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-bigtable", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.bigtable.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadRows_async", - "title": "bigtable readRows Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": false, - "file": "bigtable.read_rows.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 102, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadRows", - "fullName": "google.bigtable.v2.Bigtable.ReadRows", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "rows", - "type": ".google.bigtable.v2.RowSet" - }, - { - "name": "filter", - "type": ".google.bigtable.v2.RowFilter" - }, - { - "name": "rows_limit", - "type": "TYPE_INT64" - }, - { - "name": "request_stats_view", - "type": ".google.bigtable.v2.ReadRowsRequest.RequestStatsView" - }, - { - "name": "reversed", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.v2.ReadRowsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadRows", - "fullName": "google.bigtable.v2.Bigtable.ReadRows", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_SampleRowKeys_async", - "title": "bigtable sampleRowKeys Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": false, - "file": "bigtable.sample_row_keys.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SampleRowKeys", - "fullName": "google.bigtable.v2.Bigtable.SampleRowKeys", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.SampleRowKeysResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "SampleRowKeys", - "fullName": "google.bigtable.v2.Bigtable.SampleRowKeys", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_MutateRow_async", - "title": "bigtable mutateRow Sample", - "origin": "API_DEFINITION", - "description": " Mutates a row atomically. Cells already present in the row are left unchanged unless explicitly changed by `mutation`.", - "canonical": false, - "file": "bigtable.mutate_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MutateRow", - "fullName": "google.bigtable.v2.Bigtable.MutateRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "mutations", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.MutateRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "MutateRow", - "fullName": "google.bigtable.v2.Bigtable.MutateRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_MutateRows_async", - "title": "bigtable mutateRows Sample", - "origin": "API_DEFINITION", - "description": " Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, but the entire batch is not executed atomically.", - "canonical": false, - "file": "bigtable.mutate_rows.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MutateRows", - "fullName": "google.bigtable.v2.Bigtable.MutateRows", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "entries", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.MutateRowsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "MutateRows", - "fullName": "google.bigtable.v2.Bigtable.MutateRows", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_CheckAndMutateRow_async", - "title": "bigtable checkAndMutateRow Sample", - "origin": "API_DEFINITION", - "description": " Mutates a row atomically based on the output of a predicate Reader filter.", - "canonical": false, - "file": "bigtable.check_and_mutate_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 100, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckAndMutateRow", - "fullName": "google.bigtable.v2.Bigtable.CheckAndMutateRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "predicate_filter", - "type": ".google.bigtable.v2.RowFilter" - }, - { - "name": "true_mutations", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "false_mutations", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.CheckAndMutateRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "CheckAndMutateRow", - "fullName": "google.bigtable.v2.Bigtable.CheckAndMutateRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_PingAndWarm_async", - "title": "bigtable pingAndWarm Sample", - "origin": "API_DEFINITION", - "description": " Warm up associated instance metadata for this connection. This call is not required but may be useful for connection keep-alive.", - "canonical": false, - "file": "bigtable.ping_and_warm.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PingAndWarm", - "fullName": "google.bigtable.v2.Bigtable.PingAndWarm", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.PingAndWarmResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "PingAndWarm", - "fullName": "google.bigtable.v2.Bigtable.PingAndWarm", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async", - "title": "bigtable readModifyWriteRow Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": false, - "file": "bigtable.read_modify_write_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadModifyWriteRow", - "fullName": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "rules", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.ReadModifyWriteRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadModifyWriteRow", - "fullName": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async", - "title": "bigtable generateInitialChangeStreamPartitions Sample", - "origin": "API_DEFINITION", - "description": " NOTE: This API is intended to be used by Apache Beam BigtableIO. 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`.", - "canonical": false, - "file": "bigtable.generate_initial_change_stream_partitions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateInitialChangeStreamPartitions", - "fullName": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "GenerateInitialChangeStreamPartitions", - "fullName": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadChangeStream_async", - "title": "bigtable readChangeStream Sample", - "origin": "API_DEFINITION", - "description": " NOTE: This API is intended to be used by Apache Beam BigtableIO. Reads changes from a table's change stream. Changes will reflect both user-initiated mutations and mutations that are caused by garbage collection.", - "canonical": false, - "file": "bigtable.read_change_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 102, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadChangeStream", - "fullName": "google.bigtable.v2.Bigtable.ReadChangeStream", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "partition", - "type": ".google.bigtable.v2.StreamPartition" - }, - { - "name": "start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "continuation_tokens", - "type": ".google.bigtable.v2.StreamContinuationTokens" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "heartbeat_duration", - "type": ".google.protobuf.Duration" - } - ], - "resultType": ".google.bigtable.v2.ReadChangeStreamResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadChangeStream", - "fullName": "google.bigtable.v2.Bigtable.ReadChangeStream", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_ExecuteQuery_async", - "title": "bigtable executeQuery Sample", - "origin": "API_DEFINITION", - "description": " Executes a BTQL query against a particular Cloud Bigtable instance.", - "canonical": false, - "file": "bigtable.execute_query.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 106, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecuteQuery", - "fullName": "google.bigtable.v2.Bigtable.ExecuteQuery", - "async": true, - "parameters": [ - { - "name": "instance_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "query", - "type": "TYPE_STRING" - }, - { - "name": "proto_format", - "type": ".google.bigtable.v2.ProtoFormat" - }, - { - "name": "resume_token", - "type": "TYPE_BYTES" - }, - { - "name": "params", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.ExecuteQueryResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ExecuteQuery", - "fullName": "google.bigtable.v2.Bigtable.ExecuteQuery", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - } - ] -} diff --git a/owl-bot-staging/v2/src/index.ts b/owl-bot-staging/v2/src/index.ts deleted file mode 100644 index ce6bd1620..000000000 --- a/owl-bot-staging/v2/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 v2 from './v2'; -const BigtableClient = v2.BigtableClient; -type BigtableClient = v2.BigtableClient; -export {v2, BigtableClient}; -export default {v2, BigtableClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/v2/src/v2/bigtable_client.ts b/owl-bot-staging/v2/src/v2/bigtable_client.ts deleted file mode 100644 index 10a81027a..000000000 --- a/owl-bot-staging/v2/src/v2/bigtable_client.ts +++ /dev/null @@ -1,1451 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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'); - -/** - * 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; - 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://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [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}' - ), - 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', '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(); - 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 {object} [options] - * Call options. See {@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. - */ - 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/[^/]+/authorizedViews/[^/]+)')); - if (match) { - const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; - Object.assign(routingParameter, { authorized_view_name: parameterValue }); - } - } - } - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams( - routingParameter - ); - this.initialize(); - return this.innerApiCalls.mutateRow(request, options, callback); - } -/** - * 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/
`. - * @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. - */ - 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/[^/]+/authorizedViews/[^/]+)')); - if (match) { - const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; - Object.assign(routingParameter, { authorized_view_name: parameterValue }); - } - } - } - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams( - routingParameter - ); - this.initialize(); - return this.innerApiCalls.checkAndMutateRow(request, options, callback); - } -/** - * 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. - */ - 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(); - return this.innerApiCalls.pingAndWarm(request, options, callback); - } -/** - * 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/
`. - * @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. - * @param {object} [options] - * Call options. See {@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. - */ - 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/[^/]+/authorizedViews/[^/]+)')); - if (match) { - const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; - Object.assign(routingParameter, { authorized_view_name: parameterValue }); - } - } - } - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams( - routingParameter - ); - this.initialize(); - return this.innerApiCalls.readModifyWriteRow(request, options, callback); - } - -/** - * 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/
`. - * @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.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. - */ - 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/[^/]+/authorizedViews/[^/]+)')); - if (match) { - const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; - Object.assign(routingParameter, { authorized_view_name: parameterValue }); - } - } - } - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams( - routingParameter - ); - this.initialize(); - 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. - * - * @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/
`. - * @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.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 {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. - */ - 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/[^/]+/authorizedViews/[^/]+)')); - if (match) { - const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; - Object.assign(routingParameter, { authorized_view_name: parameterValue }); - } - } - } - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams( - routingParameter - ); - this.initialize(); - 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/
`. - * @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. - */ - 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/[^/]+/authorizedViews/[^/]+)')); - if (match) { - const parameterValue = match.groups?.['authorized_view_name'] ?? fieldValue; - Object.assign(routingParameter, { authorized_view_name: parameterValue }); - } - } - } - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams( - routingParameter - ); - this.initialize(); - return this.innerApiCalls.mutateRows(request, options); - } - -/** - * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * 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`. - * - * @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/
`. - * 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. - */ - 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(); - return this.innerApiCalls.generateInitialChangeStreamPartitions(request, options); - } - -/** - * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Reads changes from a table's change stream. Changes will - * reflect both user-initiated mutations and mutations that are caused by - * garbage collection. - * - * @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/
`. - * 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. - */ - 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(); - return this.innerApiCalls.readChangeStream(request, options); - } - -/** - * Executes a BTQL query against a particular Cloud 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. - * @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. - * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. - * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. - * @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. - */ - 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(); - 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 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._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/v2/src/v2/bigtable_client_config.json b/owl-bot-staging/v2/src/v2/bigtable_client_config.json deleted file mode 100644 index 08b7ab94c..000000000 --- a/owl-bot-staging/v2/src/v2/bigtable_client_config.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "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" - }, - "ExecuteQuery": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/v2/src/v2/bigtable_proto_list.json b/owl-bot-staging/v2/src/v2/bigtable_proto_list.json deleted file mode 100644 index f09278289..000000000 --- a/owl-bot-staging/v2/src/v2/bigtable_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/bigtable/v2/bigtable.proto", - "../../protos/google/bigtable/v2/data.proto", - "../../protos/google/bigtable/v2/feature_flags.proto", - "../../protos/google/bigtable/v2/request_stats.proto", - "../../protos/google/bigtable/v2/response_params.proto", - "../../protos/google/bigtable/v2/types.proto" -] diff --git a/owl-bot-staging/v2/src/v2/gapic_metadata.json b/owl-bot-staging/v2/src/v2/gapic_metadata.json deleted file mode 100644 index 2f87579e9..000000000 --- a/owl-bot-staging/v2/src/v2/gapic_metadata.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.bigtable.v2", - "libraryPackage": "@google-cloud/bigtable", - "services": { - "Bigtable": { - "clients": { - "grpc": { - "libraryClient": "BigtableClient", - "rpcs": { - "MutateRow": { - "methods": [ - "mutateRow" - ] - }, - "CheckAndMutateRow": { - "methods": [ - "checkAndMutateRow" - ] - }, - "PingAndWarm": { - "methods": [ - "pingAndWarm" - ] - }, - "ReadModifyWriteRow": { - "methods": [ - "readModifyWriteRow" - ] - }, - "ReadRows": { - "methods": [ - "readRows" - ] - }, - "SampleRowKeys": { - "methods": [ - "sampleRowKeys" - ] - }, - "MutateRows": { - "methods": [ - "mutateRows" - ] - }, - "GenerateInitialChangeStreamPartitions": { - "methods": [ - "generateInitialChangeStreamPartitions" - ] - }, - "ReadChangeStream": { - "methods": [ - "readChangeStream" - ] - }, - "ExecuteQuery": { - "methods": [ - "executeQuery" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "BigtableClient", - "rpcs": { - "MutateRow": { - "methods": [ - "mutateRow" - ] - }, - "CheckAndMutateRow": { - "methods": [ - "checkAndMutateRow" - ] - }, - "PingAndWarm": { - "methods": [ - "pingAndWarm" - ] - }, - "ReadModifyWriteRow": { - "methods": [ - "readModifyWriteRow" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/v2/src/v2/index.ts b/owl-bot-staging/v2/src/v2/index.ts deleted file mode 100644 index b99419be9..000000000 --- a/owl-bot-staging/v2/src/v2/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 {BigtableClient} from './bigtable_client'; diff --git a/owl-bot-staging/v2/system-test/fixtures/sample/src/index.js b/owl-bot-staging/v2/system-test/fixtures/sample/src/index.js deleted file mode 100644 index ab5a19204..000000000 --- a/owl-bot-staging/v2/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 bigtable = require('@google-cloud/bigtable'); - -function main() { - const bigtableClient = new bigtable.BigtableClient(); -} - -main(); diff --git a/owl-bot-staging/v2/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/v2/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 677af6830..000000000 --- a/owl-bot-staging/v2/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 {BigtableClient} from '@google-cloud/bigtable'; - -// check that the client class type name can be used -function doStuffWithBigtableClient(client: BigtableClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const bigtableClient = new BigtableClient(); - doStuffWithBigtableClient(bigtableClient); -} - -main(); diff --git a/owl-bot-staging/v2/system-test/install.ts b/owl-bot-staging/v2/system-test/install.ts deleted file mode 100644 index fd5bfdc71..000000000 --- a/owl-bot-staging/v2/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/v2/test/gapic_bigtable_v2.ts b/owl-bot-staging/v2/test/gapic_bigtable_v2.ts deleted file mode 100644 index 268cc5fd1..000000000 --- a/owl-bot-staging/v2/test/gapic_bigtable_v2.ts +++ /dev/null @@ -1,1585 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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(); - assert(client.bigtableStub); - client.close().then(() => { - done(); - }); - }); - - 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(); - }); - }); - - 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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.MutateRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.MutateRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.MutateRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.MutateRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedError = new Error('The client has already been closed.'); - client.close(); - 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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.CheckAndMutateRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.CheckAndMutateRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.CheckAndMutateRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.CheckAndMutateRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedError = new Error('The client has already been closed.'); - client.close(); - 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', - }); - 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', - }); - 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', - }); - 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', - }); - 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(); - 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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.ReadModifyWriteRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.ReadModifyWriteRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.ReadModifyWriteRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.ReadModifyWriteRowRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.readModifyWriteRow(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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.ReadRowsRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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({gaxServerStreamingRetries: true}); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.ReadRowsRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.ReadRowsRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.ReadRowsRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedError = new Error('The client has already been closed.'); - client.close(); - 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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.SampleRowKeysRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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({gaxServerStreamingRetries: true}); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.SampleRowKeysRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.SampleRowKeysRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.SampleRowKeysRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedError = new Error('The client has already been closed.'); - client.close(); - 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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.MutateRowsRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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({gaxServerStreamingRetries: true}); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.MutateRowsRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.MutateRowsRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedHeaderRequestParams = 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%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', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.bigtable.v2.MutateRowsRequest() - ); - // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} - request.authorizedViewName = 'projects/value/instances/value/tables/value/authorizedViews/value'; - const expectedError = new Error('The client has already been closed.'); - client.close(); - 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', - }); - 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({gaxServerStreamingRetries: true}); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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({gaxServerStreamingRetries: true}); - 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', - }); - 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', - }); - 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(); - 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', - }); - 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({gaxServerStreamingRetries: true}); - 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', - }); - 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', - }); - 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(); - 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', () => { - 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', - }); - 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', () => { - 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', - }); - 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('table', () => { - 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', - }); - 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/owl-bot-staging/v2/tsconfig.json b/owl-bot-staging/v2/tsconfig.json deleted file mode 100644 index c78f1c884..000000000 --- a/owl-bot-staging/v2/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/v2/webpack.config.js b/owl-bot-staging/v2/webpack.config.js deleted file mode 100644 index 9b488aad8..000000000 --- a/owl-bot-staging/v2/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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: 'bigtable', - filename: './bigtable.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto b/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto index a070246cc..5e3fe7aff 100644 --- a/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto +++ b/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto @@ -29,7 +29,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +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"; diff --git a/protos/google/bigtable/admin/v2/bigtable_table_admin.proto b/protos/google/bigtable/admin/v2/bigtable_table_admin.proto index 1a3ab2c83..1fdcefa4a 100644 --- a/protos/google/bigtable/admin/v2/bigtable_table_admin.proto +++ b/protos/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -31,7 +31,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +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"; @@ -360,7 +360,7 @@ service BigtableTableAdmin { // 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.RestoreTableMetadata]. The + // [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) { @@ -1219,7 +1219,7 @@ message ListBackupsResponse { // [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 exists. Values are of the form: + // 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, diff --git a/protos/google/bigtable/admin/v2/common.proto b/protos/google/bigtable/admin/v2/common.proto index cdfdb11d7..fe28f5fa8 100644 --- a/protos/google/bigtable/admin/v2/common.proto +++ b/protos/google/bigtable/admin/v2/common.proto @@ -19,7 +19,7 @@ package google.bigtable.admin.v2; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +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"; diff --git a/protos/google/bigtable/admin/v2/instance.proto b/protos/google/bigtable/admin/v2/instance.proto index 5075a1990..188dae7eb 100644 --- a/protos/google/bigtable/admin/v2/instance.proto +++ b/protos/google/bigtable/admin/v2/instance.proto @@ -22,7 +22,7 @@ import "google/bigtable/admin/v2/common.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +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"; diff --git a/protos/google/bigtable/admin/v2/table.proto b/protos/google/bigtable/admin/v2/table.proto index 387297a8f..b2ef458c8 100644 --- a/protos/google/bigtable/admin/v2/table.proto +++ b/protos/google/bigtable/admin/v2/table.proto @@ -24,7 +24,7 @@ import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +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"; @@ -456,6 +456,23 @@ message Backup { 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}/ @@ -478,14 +495,17 @@ message Backup { // 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//backups/. + // 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, with microseconds - // granularity that must be at least 6 hours and at most 90 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. + // 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]; @@ -511,6 +531,19 @@ message Backup { // 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. @@ -533,7 +566,8 @@ message BackupInfo { // 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//backups/. + // are of the form: + // projects//instances//clusters//backups/ string source_backup = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/protos/google/bigtable/admin/v2/types.proto b/protos/google/bigtable/admin/v2/types.proto index 053296189..49c50d176 100644 --- a/protos/google/bigtable/admin/v2/types.proto +++ b/protos/google/bigtable/admin/v2/types.proto @@ -19,7 +19,7 @@ package google.bigtable.admin.v2; import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +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"; @@ -32,27 +32,22 @@ option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; // // For compatibility with Bigtable's existing untyped APIs, each `Type` includes // an `Encoding` which describes how to convert to/from the underlying data. -// This might involve composing a series of steps into an "encoding chain," for -// example to convert from INT64 -> STRING -> raw bytes. In most cases, a "link" -// in the encoding chain will be based an on existing GoogleSQL conversion -// function like `CAST`. // -// Each link in the encoding chain also defines the following properties: -// * Natural sort: Does the encoded value sort consistently with the original -// typed value? Note that Bigtable will always sort data based on the raw -// encoded value, *not* the decoded type. +// Each encoding also defines the following properties: +// +// * Order-preserving: Does the encoded value sort consistently with the +// original typed value? Note that Bigtable will always sort data based on +// the raw encoded value, *not* the decoded type. // - Example: BYTES values sort in the same order as their raw encodings. -// - Counterexample: Encoding INT64 to a fixed-width STRING does *not* -// preserve sort order when dealing with negative numbers. -// INT64(1) > INT64(-1), but STRING("-00001") > STRING("00001). -// - The overall encoding chain has this property if *every* link does. +// - Counterexample: Encoding INT64 as a fixed-width decimal string does +// *not* preserve sort order when dealing with negative numbers. +// `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. // * Self-delimiting: If we concatenate two encoded values, can we always tell // where the first one ends and the second one begins? // - Example: If we encode INT64s to fixed-width STRINGs, the first value // will always contain exactly N digits, possibly preceded by a sign. // - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have // no way to tell where the first one ends. -// - The overall encoding chain has this property if *any* link does. // * Compatibility: Which other systems have matching encoding schemes? For // example, does this encoding have a GoogleSQL equivalent? HBase? Java? message Type { @@ -62,7 +57,7 @@ message Type { // Rules used to convert to/from lower level types. message Encoding { // Leaves the value "as-is" - // * Natural sort? Yes + // * Order-preserving? Yes // * Self-delimiting? No // * Compatibility? N/A message Raw {} @@ -83,19 +78,27 @@ message Type { message String { // Rules used to convert to/from lower level types. message Encoding { + // Deprecated: prefer the equivalent `Utf8Bytes`. + message Utf8Raw { + option deprecated = true; + } + // UTF-8 encoding - // * Natural sort? No (ASCII characters only) + // * Order-preserving? Yes (code point order) // * Self-delimiting? No // * Compatibility? // - BigQuery Federation `TEXT` encoding // - HBase `Bytes.toBytes` // - Java `String#getBytes(StandardCharsets.UTF_8)` - message Utf8Raw {} + message Utf8Bytes {} // Which encoding to use. oneof encoding { - // Use `Utf8Raw` encoding. - Utf8Raw utf8_raw = 1; + // Deprecated: if set, converts to an empty `utf8_bytes`. + Utf8Raw utf8_raw = 1 [deprecated = true]; + + // Use `Utf8Bytes` encoding. + Utf8Bytes utf8_bytes = 2; } } @@ -110,14 +113,14 @@ message Type { message Encoding { // Encodes the value as an 8-byte big endian twos complement `Bytes` // value. - // * Natural sort? No (positive values only) + // * Order-preserving? No (positive values only) // * Self-delimiting? Yes // * Compatibility? // - BigQuery Federation `BINARY` encoding // - HBase `Bytes.toBytes` // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` message BigEndianBytes { - // The underlying `Bytes` type, which may be able to encode further. + // Deprecated: ignored if set. Bytes bytes_type = 1; } @@ -132,6 +135,68 @@ message Type { 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 {} + + // 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; + } + + // The names and types of the fields in this struct. + repeated Field fields = 1; + } + + // 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 @@ -143,6 +208,25 @@ message Type { // 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. @@ -157,6 +241,15 @@ message Type { oneof aggregator { // Sum aggregator. Sum sum = 4; + + // HyperLogLogPlusPlusUniqueCount aggregator. + HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + + // Max aggregator. + Max max = 6; + + // Min aggregator. + Min min = 7; } } @@ -171,7 +264,31 @@ message Type { // 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; } } diff --git a/protos/google/bigtable/v2/bigtable.proto b/protos/google/bigtable/v2/bigtable.proto index 4701890a3..7c85b3f75 100644 --- a/protos/google/bigtable/v2/bigtable.proto +++ b/protos/google/bigtable/v2/bigtable.proto @@ -29,7 +29,7 @@ import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +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"; @@ -274,6 +274,23 @@ service Bigtable { option (google.api.method_signature) = "table_name"; option (google.api.method_signature) = "table_name,app_profile_id"; } + + // Executes a BTQL query against a particular Cloud 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"; + } } // Request message for Bigtable.ReadRows. @@ -1006,3 +1023,80 @@ message ReadChangeStreamResponse { 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. + string query = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Requested data format for the response. + oneof data_format { + // Protocol buffer format as described by ProtoSchema and ProtoRows + // messages. + ProtoFormat proto_format = 4; + } + + // 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. + // + // In case of Value.kind is not set, it will be set to corresponding null + // value in googlesql. + // `params["firstName"] = type {string_type {}}` + // then `@firstName` will be replaced with googlesql null string. + // + // Value.type should always be set and no inference of type will be made from + // Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + // error. + map params = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// 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; + } +} diff --git a/protos/google/bigtable/v2/data.proto b/protos/google/bigtable/v2/data.proto index f4e2f8a10..8265611f3 100644 --- a/protos/google/bigtable/v2/data.proto +++ b/protos/google/bigtable/v2/data.proto @@ -17,9 +17,12 @@ 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 = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +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"; @@ -92,6 +95,21 @@ message Cell { // 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. @@ -107,12 +125,42 @@ message Value { // 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. - // Default type for writes: `Int64` 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. + 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. @@ -511,6 +559,28 @@ message Mutation { 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 { @@ -544,6 +614,9 @@ message Mutation { // 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; @@ -609,3 +682,96 @@ message StreamContinuationToken { // 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; +} + +// Batch of serialized ProtoRows. +message ProtoRowsBatch { + // Merge partial results by concatenating these bytes, then parsing the + // overall value as a `ProtoRows` message. + bytes batch_data = 1; +} + +// A partial result set from the streaming query API. +// CBT client will buffer partial_rows from result_sets until it gets a +// resumption_token. +message PartialResultSet { + // Partial Rows in one of the supported formats. It may require many + // PartialResultSets to stream a batch of rows that can decoded on the client. + // The client should buffer partial_rows until it gets a `resume_token`, + // at which point the batch is complete and can be decoded and yielded to the + // user. Each sub-message documents the appropriate way to combine results. + oneof partial_rows { + // Partial rows in serialized ProtoRows format. + ProtoRowsBatch proto_rows_batch = 3; + } + + // An opaque token sent by the server to allow query resumption and signal + // the client to accumulate `partial_rows` since the last non-empty + // `resume_token`. On resumption, the resumed query will return the remaining + // rows for this query. + // + // If there is a batch in progress, a non-empty `resume_token` + // means that that the batch of `partial_rows` will be complete after merging + // the `partial_rows` from this response. The client must only yield + // completed batches to the application, and must ensure that any future + // retries send the latest token to avoid returning duplicate data. + // + // The server may set 'resume_token' without a 'partial_rows'. If there is a + // batch in progress the client should yield it. + // + // 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 + // `partial_rows`, then return OK. + bytes resume_token = 5; + + // Estimated size of a new batch. The server will always set this when + // returning the first `partial_rows` of a batch, and will not set it at any + // other time. + // + // The client can use this estimate to allocate an initial buffer for the + // batched 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; +} diff --git a/protos/google/bigtable/v2/feature_flags.proto b/protos/google/bigtable/v2/feature_flags.proto index ac4506f57..e97f23e15 100644 --- a/protos/google/bigtable/v2/feature_flags.proto +++ b/protos/google/bigtable/v2/feature_flags.proto @@ -17,7 +17,7 @@ syntax = "proto3"; package google.bigtable.v2; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option 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"; diff --git a/protos/google/bigtable/v2/request_stats.proto b/protos/google/bigtable/v2/request_stats.proto index 8e95c8f4f..c82876876 100644 --- a/protos/google/bigtable/v2/request_stats.proto +++ b/protos/google/bigtable/v2/request_stats.proto @@ -19,7 +19,7 @@ package google.bigtable.v2; import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +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"; diff --git a/protos/google/bigtable/v2/response_params.proto b/protos/google/bigtable/v2/response_params.proto index 536322634..feb0f7d2a 100644 --- a/protos/google/bigtable/v2/response_params.proto +++ b/protos/google/bigtable/v2/response_params.proto @@ -17,7 +17,7 @@ syntax = "proto3"; package google.bigtable.v2; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option 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"; diff --git a/owl-bot-staging/v2/protos/google/bigtable/v2/types.proto b/protos/google/bigtable/v2/types.proto similarity index 100% rename from owl-bot-staging/v2/protos/google/bigtable/v2/types.proto rename to protos/google/bigtable/v2/types.proto diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 9be2489a6..b36c94290 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -3420,9 +3420,6 @@ export namespace google { /** Instance satisfiesPzs. */ public satisfiesPzs?: (boolean|null); - /** Instance _satisfiesPzs. */ - public _satisfiesPzs?: "satisfiesPzs"; - /** * Creates a new Instance instance using the specified properties. * @param [properties] Properties to set @@ -4640,9 +4637,6 @@ export namespace google { /** DataBoostIsolationReadOnly computeBillingOwner. */ public computeBillingOwner?: (google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|keyof typeof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null); - /** DataBoostIsolationReadOnly _computeBillingOwner. */ - public _computeBillingOwner?: "computeBillingOwner"; - /** * Creates a new DataBoostIsolationReadOnly instance using the specified properties. * @param [properties] Properties to set @@ -12273,6 +12267,12 @@ export namespace google { /** 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. */ @@ -12311,6 +12311,12 @@ export namespace google { /** 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 @@ -12397,6 +12403,13 @@ export namespace google { CREATING = 1, READY = 2 } + + /** BackupType enum. */ + enum BackupType { + BACKUP_TYPE_UNSPECIFIED = 0, + STANDARD = 1, + HOT = 2 + } } /** Properties of a BackupInfo. */ @@ -12538,8 +12551,32 @@ export namespace google { /** 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); } /** Represents a Type. */ @@ -12560,11 +12597,35 @@ export namespace google { /** 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 kind. */ - public kind?: ("bytesType"|"stringType"|"int64Type"|"aggregateType"); + public kind?: ("bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"); /** * Creates a new Type instance using the specified properties. @@ -13044,6 +13105,9 @@ export namespace google { /** 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. */ @@ -13058,8 +13122,11 @@ export namespace google { /** 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"; + public encoding?: ("utf8Raw"|"utf8Bytes"); /** * Creates a new Encoding instance using the specified properties. @@ -13231,6 +13298,97 @@ export namespace google { */ 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; + } } } @@ -13534,1690 +13692,2003 @@ export namespace google { } } - /** Properties of an Aggregate. */ - interface IAggregate { + /** Properties of a Bool. */ + interface IBool { + } - /** Aggregate inputType */ - inputType?: (google.bigtable.admin.v2.IType|null); + /** Represents a Bool. */ + class Bool implements IBool { - /** Aggregate stateType */ - stateType?: (google.bigtable.admin.v2.IType|null); + /** + * Constructs a new Bool. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IBool); - /** Aggregate sum */ - sum?: (google.bigtable.admin.v2.Type.Aggregate.ISum|null); - } + /** + * 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; - /** Represents an Aggregate. */ - class Aggregate implements IAggregate { + /** + * 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; /** - * Constructs a new Aggregate. - * @param [properties] Properties to set + * 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 */ - constructor(properties?: google.bigtable.admin.v2.Type.IAggregate); + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IBool, writer?: $protobuf.Writer): $protobuf.Writer; - /** Aggregate inputType. */ - public inputType?: (google.bigtable.admin.v2.IType|null); + /** + * 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; - /** Aggregate stateType. */ - public stateType?: (google.bigtable.admin.v2.IType|null); + /** + * 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; - /** Aggregate sum. */ - public sum?: (google.bigtable.admin.v2.Type.Aggregate.ISum|null); + /** + * 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); - /** Aggregate aggregator. */ - public aggregator?: "sum"; + /** + * 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 new Aggregate instance using the specified properties. + * 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 - * @returns Aggregate instance */ - public static create(properties?: google.bigtable.admin.v2.Type.IAggregate): google.bigtable.admin.v2.Type.Aggregate; + constructor(properties?: google.bigtable.admin.v2.Type.IFloat32); /** - * 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 + * 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.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.Type.IFloat32, 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 + * 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.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IFloat32, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Aggregate message from the specified reader or buffer. + * 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 Aggregate + * @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.Aggregate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.Type.Float32; /** - * Decodes an Aggregate message from the specified reader or buffer, length delimited. + * Decodes a Float32 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Aggregate + * @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.Aggregate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.Type.Float32; /** - * Verifies an Aggregate message. + * 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 an Aggregate message from a plain object. Also converts values to their respective internal types. + * Creates a Float32 message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Aggregate + * @returns Float32 */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Aggregate; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Float32; /** - * Creates a plain object from an Aggregate message. Also converts values to other types if specified. - * @param message Aggregate + * 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.Aggregate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.Type.Float32, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Aggregate to JSON. + * Converts this Float32 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Aggregate + * 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; } - namespace Aggregate { + /** Properties of a Float64. */ + interface IFloat64 { + } - /** Properties of a Sum. */ - interface ISum { - } + /** Represents a Float64. */ + class Float64 implements IFloat64 { - /** Represents a Sum. */ - class Sum implements ISum { + /** + * Constructs a new Float64. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IFloat64); - /** - * Constructs a new Sum. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.ISum); + /** + * 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; - /** - * 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 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 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 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; - /** - * 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 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 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 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; - /** - * 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 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); - /** - * 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 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 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 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 }; - /** - * 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 Float64 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this Sum 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; + } - /** - * 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 Timestamp. */ + interface ITimestamp { } - } - } - } - /** Namespace v2. */ - namespace v2 { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { - /** Represents a Bigtable */ - class Bigtable extends $protobuf.rpc.Service { + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.ITimestamp); - /** - * 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 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * Calls ReadRows. - * @param request ReadRowsRequest message or plain object - * @returns Promise - */ - public readRows(request: google.bigtable.v2.IReadRowsRequest): Promise; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * Calls SampleRowKeys. - * @param request SampleRowKeysRequest message or plain object - * @returns Promise - */ - public sampleRowKeys(request: google.bigtable.v2.ISampleRowKeysRequest): Promise; + /** + * 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); - /** - * 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; + /** + * 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; - /** - * Calls MutateRow. - * @param request MutateRowRequest message or plain object - * @returns Promise - */ - public mutateRow(request: google.bigtable.v2.IMutateRowRequest): Promise; + /** + * 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 }; - /** - * 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; + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Calls MutateRows. - * @param request MutateRowsRequest message or plain object - * @returns Promise - */ - public mutateRows(request: google.bigtable.v2.IMutateRowsRequest): Promise; + /** + * 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; + } - /** - * 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; + /** Properties of a Date. */ + interface IDate { + } - /** - * Calls CheckAndMutateRow. - * @param request CheckAndMutateRowRequest message or plain object - * @returns Promise - */ - public checkAndMutateRow(request: google.bigtable.v2.ICheckAndMutateRowRequest): Promise; + /** Represents a Date. */ + class Date implements IDate { - /** - * 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; + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IDate); - /** - * Calls PingAndWarm. - * @param request PingAndWarmRequest message or plain object - * @returns Promise - */ - public pingAndWarm(request: google.bigtable.v2.IPingAndWarmRequest): Promise; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * Calls ReadModifyWriteRow. - * @param request ReadModifyWriteRowRequest message or plain object - * @returns Promise - */ - public readModifyWriteRow(request: google.bigtable.v2.IReadModifyWriteRowRequest): Promise; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * Calls GenerateInitialChangeStreamPartitions. - * @param request GenerateInitialChangeStreamPartitionsRequest message or plain object - * @returns Promise - */ - public generateInitialChangeStreamPartitions(request: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest): Promise; + /** + * 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; - /** - * 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; + /** + * 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); - /** - * Calls ReadChangeStream. - * @param request ReadChangeStreamRequest message or plain object - * @returns Promise - */ - public readChangeStream(request: google.bigtable.v2.IReadChangeStreamRequest): Promise; - } + /** + * 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; - namespace Bigtable { + /** + * 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 }; - /** - * 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; + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * 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; + } - /** - * 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; + /** Properties of a Struct. */ + interface IStruct { - /** - * 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; + /** Struct fields */ + fields?: (google.bigtable.admin.v2.Type.Struct.IField[]|null); + } - /** - * 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; + /** Represents a Struct. */ + class Struct implements IStruct { - /** - * 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; + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IStruct); - /** - * 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; + /** Struct fields. */ + public fields: google.bigtable.admin.v2.Type.Struct.IField[]; - /** - * 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; + /** + * 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; - /** - * 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; - } + /** + * 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; - /** Properties of a ReadRowsRequest. */ - interface IReadRowsRequest { + /** + * 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; - /** ReadRowsRequest tableName */ - tableName?: (string|null); + /** + * 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; - /** ReadRowsRequest authorizedViewName */ - authorizedViewName?: (string|null); + /** + * 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; - /** ReadRowsRequest appProfileId */ - appProfileId?: (string|null); + /** + * 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); - /** ReadRowsRequest rows */ - rows?: (google.bigtable.v2.IRowSet|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; - /** ReadRowsRequest filter */ - filter?: (google.bigtable.v2.IRowFilter|null); + /** + * 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 }; - /** ReadRowsRequest rowsLimit */ - rowsLimit?: (number|Long|string|null); + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ReadRowsRequest requestStatsView */ - requestStatsView?: (google.bigtable.v2.ReadRowsRequest.RequestStatsView|keyof typeof google.bigtable.v2.ReadRowsRequest.RequestStatsView|null); + /** + * 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; + } - /** ReadRowsRequest reversed */ - reversed?: (boolean|null); - } + namespace Struct { - /** Represents a ReadRowsRequest. */ - class ReadRowsRequest implements IReadRowsRequest { + /** Properties of a Field. */ + interface IField { - /** - * Constructs a new ReadRowsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IReadRowsRequest); + /** Field fieldName */ + fieldName?: (string|null); - /** ReadRowsRequest tableName. */ - public tableName: string; + /** Field type */ + type?: (google.bigtable.admin.v2.IType|null); + } - /** ReadRowsRequest authorizedViewName. */ - public authorizedViewName: string; + /** Represents a Field. */ + class Field implements IField { - /** ReadRowsRequest appProfileId. */ - public appProfileId: string; + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Struct.IField); - /** ReadRowsRequest rows. */ - public rows?: (google.bigtable.v2.IRowSet|null); + /** Field fieldName. */ + public fieldName: string; - /** ReadRowsRequest filter. */ - public filter?: (google.bigtable.v2.IRowFilter|null); + /** Field type. */ + public type?: (google.bigtable.admin.v2.IType|null); - /** ReadRowsRequest rowsLimit. */ - public rowsLimit: (number|Long|string); + /** + * 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; - /** ReadRowsRequest requestStatsView. */ - public requestStatsView: (google.bigtable.v2.ReadRowsRequest.RequestStatsView|keyof typeof google.bigtable.v2.ReadRowsRequest.RequestStatsView); + /** + * 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; - /** ReadRowsRequest reversed. */ - public reversed: boolean; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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); - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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 }; - /** - * 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); + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * 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; + } + } - /** - * 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 }; + /** Properties of an Array. */ + interface IArray { - /** - * Converts this ReadRowsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Array elementType */ + elementType?: (google.bigtable.admin.v2.IType|null); + } - /** - * 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; - } + /** Represents an Array. */ + class Array implements IArray { - namespace ReadRowsRequest { + /** + * Constructs a new Array. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IArray); - /** RequestStatsView enum. */ - enum RequestStatsView { - REQUEST_STATS_VIEW_UNSPECIFIED = 0, - REQUEST_STATS_NONE = 1, - REQUEST_STATS_FULL = 2 - } - } + /** Array elementType. */ + public elementType?: (google.bigtable.admin.v2.IType|null); - /** Properties of a ReadRowsResponse. */ - interface IReadRowsResponse { + /** + * 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; - /** ReadRowsResponse chunks */ - chunks?: (google.bigtable.v2.ReadRowsResponse.ICellChunk[]|null); + /** + * 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; - /** ReadRowsResponse lastScannedRowKey */ - lastScannedRowKey?: (Uint8Array|string|null); + /** + * 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; - /** ReadRowsResponse requestStats */ - requestStats?: (google.bigtable.v2.IRequestStats|null); - } + /** + * 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; - /** Represents a ReadRowsResponse. */ - class ReadRowsResponse implements IReadRowsResponse { + /** + * 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; - /** - * Constructs a new ReadRowsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IReadRowsResponse); + /** + * 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); - /** ReadRowsResponse chunks. */ - public chunks: google.bigtable.v2.ReadRowsResponse.ICellChunk[]; + /** + * 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; - /** ReadRowsResponse lastScannedRowKey. */ - public lastScannedRowKey: (Uint8Array|string); + /** + * 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 }; - /** ReadRowsResponse requestStats. */ - public requestStats?: (google.bigtable.v2.IRequestStats|null); + /** + * Converts this Array to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * 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; + } - /** - * 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; + /** Properties of a Map. */ + interface IMap { - /** - * 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; + /** Map keyType */ + keyType?: (google.bigtable.admin.v2.IType|null); - /** - * 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; + /** Map valueType */ + valueType?: (google.bigtable.admin.v2.IType|null); + } - /** - * 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; + /** Represents a Map. */ + class Map implements IMap { - /** - * 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); + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IMap); - /** - * 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; + /** Map keyType. */ + public keyType?: (google.bigtable.admin.v2.IType|null); - /** - * 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 }; + /** Map valueType. */ + public valueType?: (google.bigtable.admin.v2.IType|null); - /** - * Converts this ReadRowsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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; - namespace ReadRowsResponse { + /** + * 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; - /** Properties of a CellChunk. */ - interface ICellChunk { + /** + * 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; - /** CellChunk rowKey */ - rowKey?: (Uint8Array|string|null); + /** + * 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; - /** CellChunk familyName */ - familyName?: (google.protobuf.IStringValue|null); + /** + * 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); - /** CellChunk qualifier */ - qualifier?: (google.protobuf.IBytesValue|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; - /** CellChunk timestampMicros */ - timestampMicros?: (number|Long|string|null); + /** + * 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 }; - /** CellChunk labels */ - labels?: (string[]|null); + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** CellChunk value */ - value?: (Uint8Array|string|null); + /** + * 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; + } - /** CellChunk valueSize */ - valueSize?: (number|null); + /** Properties of an Aggregate. */ + interface IAggregate { - /** CellChunk resetRow */ - resetRow?: (boolean|null); + /** Aggregate inputType */ + inputType?: (google.bigtable.admin.v2.IType|null); - /** CellChunk commitRow */ - commitRow?: (boolean|null); - } - - /** Represents a CellChunk. */ - class CellChunk implements ICellChunk { + /** Aggregate stateType */ + stateType?: (google.bigtable.admin.v2.IType|null); - /** - * Constructs a new CellChunk. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ReadRowsResponse.ICellChunk); + /** Aggregate sum */ + sum?: (google.bigtable.admin.v2.Type.Aggregate.ISum|null); - /** CellChunk rowKey. */ - public rowKey: (Uint8Array|string); + /** Aggregate hllppUniqueCount */ + hllppUniqueCount?: (google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null); - /** CellChunk familyName. */ - public familyName?: (google.protobuf.IStringValue|null); + /** Aggregate max */ + max?: (google.bigtable.admin.v2.Type.Aggregate.IMax|null); - /** CellChunk qualifier. */ - public qualifier?: (google.protobuf.IBytesValue|null); + /** Aggregate min */ + min?: (google.bigtable.admin.v2.Type.Aggregate.IMin|null); + } - /** CellChunk timestampMicros. */ - public timestampMicros: (number|Long|string); + /** Represents an Aggregate. */ + class Aggregate implements IAggregate { - /** CellChunk labels. */ - public labels: string[]; + /** + * Constructs a new Aggregate. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IAggregate); - /** CellChunk value. */ - public value: (Uint8Array|string); + /** Aggregate inputType. */ + public inputType?: (google.bigtable.admin.v2.IType|null); - /** CellChunk valueSize. */ - public valueSize: number; + /** Aggregate stateType. */ + public stateType?: (google.bigtable.admin.v2.IType|null); - /** CellChunk resetRow. */ - public resetRow?: (boolean|null); + /** Aggregate sum. */ + public sum?: (google.bigtable.admin.v2.Type.Aggregate.ISum|null); - /** CellChunk commitRow. */ - public commitRow?: (boolean|null); + /** Aggregate hllppUniqueCount. */ + public hllppUniqueCount?: (google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null); - /** CellChunk rowStatus. */ - public rowStatus?: ("resetRow"|"commitRow"); + /** Aggregate max. */ + public max?: (google.bigtable.admin.v2.Type.Aggregate.IMax|null); - /** - * 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; + /** Aggregate min. */ + public min?: (google.bigtable.admin.v2.Type.Aggregate.IMin|null); - /** - * 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; + /** Aggregate aggregator. */ + public aggregator?: ("sum"|"hllppUniqueCount"|"max"|"min"); - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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 }; + /** + * 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); - /** - * Converts this CellChunk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } - } + /** + * 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 }; - /** Properties of a SampleRowKeysRequest. */ - interface ISampleRowKeysRequest { + /** + * Converts this Aggregate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SampleRowKeysRequest tableName */ - tableName?: (string|null); + /** + * 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; + } - /** SampleRowKeysRequest authorizedViewName */ - authorizedViewName?: (string|null); + namespace Aggregate { - /** SampleRowKeysRequest appProfileId */ - appProfileId?: (string|null); - } + /** Properties of a Sum. */ + interface ISum { + } - /** Represents a SampleRowKeysRequest. */ - class SampleRowKeysRequest implements ISampleRowKeysRequest { + /** Represents a Sum. */ + class Sum implements ISum { - /** - * Constructs a new SampleRowKeysRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ISampleRowKeysRequest); + /** + * Constructs a new Sum. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.ISum); - /** SampleRowKeysRequest tableName. */ - public tableName: string; + /** + * 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; - /** SampleRowKeysRequest authorizedViewName. */ - public authorizedViewName: string; + /** + * 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; - /** SampleRowKeysRequest appProfileId. */ - public appProfileId: string; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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 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; - /** - * 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; + /** + * 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); - /** - * 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; + /** + * 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; - /** - * 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 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 }; - /** - * 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; + /** + * Converts this Sum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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 }; + /** + * 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; + } - /** - * Converts this SampleRowKeysRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a Max. */ + interface IMax { + } - /** - * 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; - } + /** Represents a Max. */ + class Max implements IMax { - /** Properties of a SampleRowKeysResponse. */ - interface ISampleRowKeysResponse { + /** + * Constructs a new Max. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.IMax); - /** SampleRowKeysResponse rowKey */ - rowKey?: (Uint8Array|string|null); + /** + * 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; - /** SampleRowKeysResponse offsetBytes */ - offsetBytes?: (number|Long|string|null); - } + /** + * 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; - /** Represents a SampleRowKeysResponse. */ - class SampleRowKeysResponse implements ISampleRowKeysResponse { + /** + * 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; - /** - * Constructs a new SampleRowKeysResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ISampleRowKeysResponse); + /** + * 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; - /** SampleRowKeysResponse rowKey. */ - public rowKey: (Uint8Array|string); + /** + * 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; - /** SampleRowKeysResponse offsetBytes. */ - public offsetBytes: (number|Long|string); + /** + * 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 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; + /** + * 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; - /** - * 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; + /** + * 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 }; - /** - * 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; + /** + * Converts this Max to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * 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; + } - /** - * 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; + /** Properties of a Min. */ + interface IMin { + } - /** - * 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); + /** Represents a Min. */ + class Min implements IMin { - /** - * 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; + /** + * Constructs a new Min. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.IMin); - /** - * 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 }; + /** + * 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; - /** - * Converts this SampleRowKeysResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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; - /** Properties of a MutateRowRequest. */ - interface IMutateRowRequest { + /** + * 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; - /** MutateRowRequest tableName */ - tableName?: (string|null); + /** + * 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; - /** MutateRowRequest authorizedViewName */ - authorizedViewName?: (string|null); + /** + * 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); - /** MutateRowRequest appProfileId */ - appProfileId?: (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; - /** MutateRowRequest rowKey */ - rowKey?: (Uint8Array|string|null); + /** + * 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 }; - /** MutateRowRequest mutations */ - mutations?: (google.bigtable.v2.IMutation[]|null); - } + /** + * Converts this Min to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a MutateRowRequest. */ - class MutateRowRequest implements IMutateRowRequest { + /** + * 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; + } - /** - * Constructs a new MutateRowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IMutateRowRequest); + /** Properties of a HyperLogLogPlusPlusUniqueCount. */ + interface IHyperLogLogPlusPlusUniqueCount { + } - /** MutateRowRequest tableName. */ - public tableName: string; + /** Represents a HyperLogLogPlusPlusUniqueCount. */ + class HyperLogLogPlusPlusUniqueCount implements IHyperLogLogPlusPlusUniqueCount { - /** MutateRowRequest authorizedViewName. */ - public authorizedViewName: string; + /** + * Constructs a new HyperLogLogPlusPlusUniqueCount. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount); - /** MutateRowRequest appProfileId. */ - public appProfileId: string; + /** + * 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; - /** MutateRowRequest rowKey. */ - public rowKey: (Uint8Array|string); + /** + * 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; - /** MutateRowRequest mutations. */ - public mutations: google.bigtable.v2.IMutation[]; + /** + * 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 { /** - * Creates a new MutateRowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns MutateRowRequest instance + * 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 */ - public static create(properties?: google.bigtable.v2.IMutateRowRequest): google.bigtable.v2.MutateRowRequest; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * 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 + * 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 encode(message: google.bigtable.v2.IMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Bigtable; /** - * 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 + * Calls ReadRows. + * @param request ReadRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadRowsResponse */ - public static encodeDelimited(message: google.bigtable.v2.IMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public readRows(request: google.bigtable.v2.IReadRowsRequest, callback: google.bigtable.v2.Bigtable.ReadRowsCallback): void; /** - * 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 + * Calls ReadRows. + * @param request ReadRowsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.MutateRowRequest; + public readRows(request: google.bigtable.v2.IReadRowsRequest): Promise; /** - * 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 + * Calls SampleRowKeys. + * @param request SampleRowKeysRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SampleRowKeysResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.MutateRowRequest; + public sampleRowKeys(request: google.bigtable.v2.ISampleRowKeysRequest, callback: google.bigtable.v2.Bigtable.SampleRowKeysCallback): void; /** - * Verifies a MutateRowRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls SampleRowKeys. + * @param request SampleRowKeysRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public sampleRowKeys(request: google.bigtable.v2.ISampleRowKeysRequest): Promise; /** - * Creates a MutateRowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MutateRowRequest + * Calls MutateRow. + * @param request MutateRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MutateRowResponse */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowRequest; + public mutateRow(request: google.bigtable.v2.IMutateRowRequest, callback: google.bigtable.v2.Bigtable.MutateRowCallback): void; /** - * 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 + * Calls MutateRow. + * @param request MutateRowRequest message or plain object + * @returns Promise */ - public static toObject(message: google.bigtable.v2.MutateRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public mutateRow(request: google.bigtable.v2.IMutateRowRequest): Promise; /** - * Converts this MutateRowRequest to JSON. - * @returns JSON object + * Calls MutateRows. + * @param request MutateRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MutateRowsResponse */ - public toJSON(): { [k: string]: any }; + public mutateRows(request: google.bigtable.v2.IMutateRowsRequest, callback: google.bigtable.v2.Bigtable.MutateRowsCallback): void; /** - * Gets the default type url for MutateRowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls MutateRows. + * @param request MutateRowsRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MutateRowResponse. */ - interface IMutateRowResponse { - } + public mutateRows(request: google.bigtable.v2.IMutateRowsRequest): Promise; - /** Represents a MutateRowResponse. */ - class MutateRowResponse implements IMutateRowResponse { + /** + * 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; /** - * Constructs a new MutateRowResponse. - * @param [properties] Properties to set + * Calls CheckAndMutateRow. + * @param request CheckAndMutateRowRequest message or plain object + * @returns Promise */ - constructor(properties?: google.bigtable.v2.IMutateRowResponse); + public checkAndMutateRow(request: google.bigtable.v2.ICheckAndMutateRowRequest): Promise; /** - * Creates a new MutateRowResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MutateRowResponse instance + * Calls PingAndWarm. + * @param request PingAndWarmRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PingAndWarmResponse */ - public static create(properties?: google.bigtable.v2.IMutateRowResponse): google.bigtable.v2.MutateRowResponse; + public pingAndWarm(request: google.bigtable.v2.IPingAndWarmRequest, callback: google.bigtable.v2.Bigtable.PingAndWarmCallback): void; /** - * 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 + * Calls PingAndWarm. + * @param request PingAndWarmRequest message or plain object + * @returns Promise */ - public static encode(message: google.bigtable.v2.IMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public pingAndWarm(request: google.bigtable.v2.IPingAndWarmRequest): Promise; /** - * 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 + * Calls ReadModifyWriteRow. + * @param request ReadModifyWriteRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadModifyWriteRowResponse */ - public static encodeDelimited(message: google.bigtable.v2.IMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public readModifyWriteRow(request: google.bigtable.v2.IReadModifyWriteRowRequest, callback: google.bigtable.v2.Bigtable.ReadModifyWriteRowCallback): void; /** - * 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 + * Calls ReadModifyWriteRow. + * @param request ReadModifyWriteRowRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.MutateRowResponse; + public readModifyWriteRow(request: google.bigtable.v2.IReadModifyWriteRowRequest): Promise; /** - * 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 + * Calls GenerateInitialChangeStreamPartitions. + * @param request GenerateInitialChangeStreamPartitionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateInitialChangeStreamPartitionsResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.MutateRowResponse; + public generateInitialChangeStreamPartitions(request: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest, callback: google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitionsCallback): void; /** - * Verifies a MutateRowResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GenerateInitialChangeStreamPartitions. + * @param request GenerateInitialChangeStreamPartitionsRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public generateInitialChangeStreamPartitions(request: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest): Promise; /** - * Creates a MutateRowResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MutateRowResponse + * Calls ReadChangeStream. + * @param request ReadChangeStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadChangeStreamResponse */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowResponse; + public readChangeStream(request: google.bigtable.v2.IReadChangeStreamRequest, callback: google.bigtable.v2.Bigtable.ReadChangeStreamCallback): void; /** - * 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 + * Calls ReadChangeStream. + * @param request ReadChangeStreamRequest message or plain object + * @returns Promise */ - public static toObject(message: google.bigtable.v2.MutateRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public readChangeStream(request: google.bigtable.v2.IReadChangeStreamRequest): Promise; /** - * Converts this MutateRowResponse to JSON. - * @returns JSON object + * Calls ExecuteQuery. + * @param request ExecuteQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteQueryResponse */ - public toJSON(): { [k: string]: any }; + public executeQuery(request: google.bigtable.v2.IExecuteQueryRequest, callback: google.bigtable.v2.Bigtable.ExecuteQueryCallback): void; /** - * Gets the default type url for MutateRowResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls ExecuteQuery. + * @param request ExecuteQueryRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; + public executeQuery(request: google.bigtable.v2.IExecuteQueryRequest): Promise; } - /** Properties of a MutateRowsRequest. */ - interface IMutateRowsRequest { + namespace Bigtable { - /** MutateRowsRequest tableName */ + /** + * 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|executeQuery}. + * @param error Error, if any + * @param [response] ExecuteQueryResponse + */ + type ExecuteQueryCallback = (error: (Error|null), response?: google.bigtable.v2.ExecuteQueryResponse) => void; + } + + /** Properties of a ReadRowsRequest. */ + interface IReadRowsRequest { + + /** ReadRowsRequest tableName */ tableName?: (string|null); - /** MutateRowsRequest authorizedViewName */ + /** ReadRowsRequest authorizedViewName */ authorizedViewName?: (string|null); - /** MutateRowsRequest appProfileId */ + /** ReadRowsRequest appProfileId */ appProfileId?: (string|null); - /** MutateRowsRequest entries */ - entries?: (google.bigtable.v2.MutateRowsRequest.IEntry[]|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 MutateRowsRequest. */ - class MutateRowsRequest implements IMutateRowsRequest { + /** Represents a ReadRowsRequest. */ + class ReadRowsRequest implements IReadRowsRequest { /** - * Constructs a new MutateRowsRequest. + * Constructs a new ReadRowsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IMutateRowsRequest); + constructor(properties?: google.bigtable.v2.IReadRowsRequest); - /** MutateRowsRequest tableName. */ + /** ReadRowsRequest tableName. */ public tableName: string; - /** MutateRowsRequest authorizedViewName. */ + /** ReadRowsRequest authorizedViewName. */ public authorizedViewName: string; - /** MutateRowsRequest appProfileId. */ + /** ReadRowsRequest appProfileId. */ public appProfileId: string; - /** MutateRowsRequest entries. */ - public entries: google.bigtable.v2.MutateRowsRequest.IEntry[]; + /** 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 MutateRowsRequest instance using the specified properties. + * Creates a new ReadRowsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MutateRowsRequest instance + * @returns ReadRowsRequest instance */ - public static create(properties?: google.bigtable.v2.IMutateRowsRequest): google.bigtable.v2.MutateRowsRequest; + public static create(properties?: google.bigtable.v2.IReadRowsRequest): google.bigtable.v2.ReadRowsRequest; /** - * 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 + * 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.IMutateRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IReadRowsRequest, 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 + * 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.IMutateRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IReadRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MutateRowsRequest message from the specified reader or buffer. + * 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 MutateRowsRequest + * @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.MutateRowsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.ReadRowsRequest; /** - * Decodes a MutateRowsRequest message from the specified reader or buffer, length delimited. + * Decodes a ReadRowsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MutateRowsRequest + * @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.MutateRowsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.ReadRowsRequest; /** - * Verifies a MutateRowsRequest message. + * 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 MutateRowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReadRowsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MutateRowsRequest + * @returns ReadRowsRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsRequest; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadRowsRequest; /** - * Creates a plain object from a MutateRowsRequest message. Also converts values to other types if specified. - * @param message MutateRowsRequest + * 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.MutateRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.ReadRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MutateRowsRequest to JSON. + * Converts this ReadRowsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MutateRowsRequest + * 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 MutateRowsRequest { - - /** Properties of an Entry. */ - interface IEntry { - - /** Entry rowKey */ - rowKey?: (Uint8Array|string|null); + namespace ReadRowsRequest { - /** Entry mutations */ - mutations?: (google.bigtable.v2.IMutation[]|null); + /** RequestStatsView enum. */ + enum RequestStatsView { + REQUEST_STATS_VIEW_UNSPECIFIED = 0, + REQUEST_STATS_NONE = 1, + REQUEST_STATS_FULL = 2 } + } - /** Represents an Entry. */ - class Entry implements IEntry { + /** Properties of a ReadRowsResponse. */ + interface IReadRowsResponse { - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.MutateRowsRequest.IEntry); + /** ReadRowsResponse chunks */ + chunks?: (google.bigtable.v2.ReadRowsResponse.ICellChunk[]|null); - /** Entry rowKey. */ - public rowKey: (Uint8Array|string); - - /** Entry mutations. */ - public mutations: google.bigtable.v2.IMutation[]; - - /** - * 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); + /** ReadRowsResponse lastScannedRowKey */ + lastScannedRowKey?: (Uint8Array|string|null); - /** MutateRowsResponse rateLimitInfo */ - rateLimitInfo?: (google.bigtable.v2.IRateLimitInfo|null); + /** ReadRowsResponse requestStats */ + requestStats?: (google.bigtable.v2.IRequestStats|null); } - /** Represents a MutateRowsResponse. */ - class MutateRowsResponse implements IMutateRowsResponse { + /** Represents a ReadRowsResponse. */ + class ReadRowsResponse implements IReadRowsResponse { /** - * Constructs a new MutateRowsResponse. + * Constructs a new ReadRowsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IMutateRowsResponse); + constructor(properties?: google.bigtable.v2.IReadRowsResponse); - /** MutateRowsResponse entries. */ - public entries: google.bigtable.v2.MutateRowsResponse.IEntry[]; + /** ReadRowsResponse chunks. */ + public chunks: google.bigtable.v2.ReadRowsResponse.ICellChunk[]; - /** MutateRowsResponse rateLimitInfo. */ - public rateLimitInfo?: (google.bigtable.v2.IRateLimitInfo|null); + /** ReadRowsResponse lastScannedRowKey. */ + public lastScannedRowKey: (Uint8Array|string); - /** MutateRowsResponse _rateLimitInfo. */ - public _rateLimitInfo?: "rateLimitInfo"; + /** ReadRowsResponse requestStats. */ + public requestStats?: (google.bigtable.v2.IRequestStats|null); /** - * Creates a new MutateRowsResponse instance using the specified properties. + * Creates a new ReadRowsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MutateRowsResponse instance + * @returns ReadRowsResponse instance */ - public static create(properties?: google.bigtable.v2.IMutateRowsResponse): google.bigtable.v2.MutateRowsResponse; + public static create(properties?: google.bigtable.v2.IReadRowsResponse): google.bigtable.v2.ReadRowsResponse; /** - * 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 + * 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.IMutateRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IReadRowsResponse, 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 + * 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.IMutateRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IReadRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MutateRowsResponse message from the specified reader or buffer. + * 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 MutateRowsResponse + * @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.MutateRowsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.ReadRowsResponse; /** - * Decodes a MutateRowsResponse message from the specified reader or buffer, length delimited. + * Decodes a ReadRowsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MutateRowsResponse + * @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.MutateRowsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.ReadRowsResponse; /** - * Verifies a MutateRowsResponse message. + * 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 MutateRowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReadRowsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MutateRowsResponse + * @returns ReadRowsResponse */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsResponse; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadRowsResponse; /** - * Creates a plain object from a MutateRowsResponse message. Also converts values to other types if specified. - * @param message MutateRowsResponse + * 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.MutateRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.ReadRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MutateRowsResponse to JSON. + * Converts this ReadRowsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MutateRowsResponse + * 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 MutateRowsResponse { + namespace ReadRowsResponse { - /** Properties of an Entry. */ - interface IEntry { + /** Properties of a CellChunk. */ + interface ICellChunk { - /** Entry index */ - index?: (number|Long|string|null); + /** CellChunk rowKey */ + rowKey?: (Uint8Array|string|null); - /** Entry status */ - status?: (google.rpc.IStatus|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|string|null); + + /** CellChunk valueSize */ + valueSize?: (number|null); + + /** CellChunk resetRow */ + resetRow?: (boolean|null); + + /** CellChunk commitRow */ + commitRow?: (boolean|null); } - /** Represents an Entry. */ - class Entry implements IEntry { + /** Represents a CellChunk. */ + class CellChunk implements ICellChunk { /** - * Constructs a new Entry. + * Constructs a new CellChunk. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.MutateRowsResponse.IEntry); + constructor(properties?: google.bigtable.v2.ReadRowsResponse.ICellChunk); - /** Entry index. */ - public index: (number|Long|string); + /** CellChunk rowKey. */ + public rowKey: (Uint8Array|string); - /** Entry status. */ - public status?: (google.rpc.IStatus|null); + /** 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|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 Entry instance using the specified properties. + * Creates a new CellChunk instance using the specified properties. * @param [properties] Properties to set - * @returns Entry instance + * @returns CellChunk instance */ - public static create(properties?: google.bigtable.v2.MutateRowsResponse.IEntry): google.bigtable.v2.MutateRowsResponse.Entry; + public static create(properties?: google.bigtable.v2.ReadRowsResponse.ICellChunk): google.bigtable.v2.ReadRowsResponse.CellChunk; /** - * 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 + * 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.MutateRowsResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.ReadRowsResponse.ICellChunk, 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 + * 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.MutateRowsResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.ReadRowsResponse.ICellChunk, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Entry message from the specified reader or buffer. + * 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 Entry + * @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.MutateRowsResponse.Entry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.ReadRowsResponse.CellChunk; /** - * Decodes an Entry message from the specified reader or buffer, length delimited. + * Decodes a CellChunk message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Entry + * @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.MutateRowsResponse.Entry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.ReadRowsResponse.CellChunk; /** - * Verifies an Entry message. + * 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 an Entry message from a plain object. Also converts values to their respective internal types. + * Creates a CellChunk message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Entry + * @returns CellChunk */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsResponse.Entry; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadRowsResponse.CellChunk; /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry + * 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.MutateRowsResponse.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.ReadRowsResponse.CellChunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Entry to JSON. + * Converts this CellChunk to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Entry + * Gets the default type url for CellChunk * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -15225,4471 +15696,9033 @@ export namespace google { } } - /** Properties of a RateLimitInfo. */ - interface IRateLimitInfo { + /** Properties of a SampleRowKeysRequest. */ + interface ISampleRowKeysRequest { - /** RateLimitInfo period */ - period?: (google.protobuf.IDuration|null); + /** SampleRowKeysRequest tableName */ + tableName?: (string|null); - /** RateLimitInfo factor */ - factor?: (number|null); + /** SampleRowKeysRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** SampleRowKeysRequest appProfileId */ + appProfileId?: (string|null); } - /** Represents a RateLimitInfo. */ - class RateLimitInfo implements IRateLimitInfo { + /** Represents a SampleRowKeysRequest. */ + class SampleRowKeysRequest implements ISampleRowKeysRequest { /** - * Constructs a new RateLimitInfo. + * Constructs a new SampleRowKeysRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IRateLimitInfo); + constructor(properties?: google.bigtable.v2.ISampleRowKeysRequest); - /** RateLimitInfo period. */ - public period?: (google.protobuf.IDuration|null); + /** SampleRowKeysRequest tableName. */ + public tableName: string; - /** RateLimitInfo factor. */ - public factor: number; + /** SampleRowKeysRequest authorizedViewName. */ + public authorizedViewName: string; + + /** SampleRowKeysRequest appProfileId. */ + public appProfileId: string; /** - * Creates a new RateLimitInfo instance using the specified properties. + * Creates a new SampleRowKeysRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RateLimitInfo instance + * @returns SampleRowKeysRequest instance */ - public static create(properties?: google.bigtable.v2.IRateLimitInfo): google.bigtable.v2.RateLimitInfo; + public static create(properties?: google.bigtable.v2.ISampleRowKeysRequest): google.bigtable.v2.SampleRowKeysRequest; /** - * 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 + * 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.IRateLimitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.ISampleRowKeysRequest, 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 + * 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.IRateLimitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.ISampleRowKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RateLimitInfo message from the specified reader or buffer. + * 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 RateLimitInfo + * @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.RateLimitInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.SampleRowKeysRequest; /** - * Decodes a RateLimitInfo message from the specified reader or buffer, length delimited. + * Decodes a SampleRowKeysRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RateLimitInfo + * @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.RateLimitInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.SampleRowKeysRequest; /** - * Verifies a RateLimitInfo message. + * 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 RateLimitInfo message from a plain object. Also converts values to their respective internal types. + * Creates a SampleRowKeysRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RateLimitInfo + * @returns SampleRowKeysRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RateLimitInfo; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SampleRowKeysRequest; /** - * Creates a plain object from a RateLimitInfo message. Also converts values to other types if specified. - * @param message RateLimitInfo + * 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.RateLimitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.SampleRowKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RateLimitInfo to JSON. + * Converts this SampleRowKeysRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RateLimitInfo + * 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 CheckAndMutateRowRequest. */ - interface ICheckAndMutateRowRequest { - - /** CheckAndMutateRowRequest tableName */ - tableName?: (string|null); - - /** CheckAndMutateRowRequest authorizedViewName */ - authorizedViewName?: (string|null); - - /** CheckAndMutateRowRequest appProfileId */ - appProfileId?: (string|null); + /** Properties of a SampleRowKeysResponse. */ + interface ISampleRowKeysResponse { - /** CheckAndMutateRowRequest rowKey */ + /** SampleRowKeysResponse rowKey */ rowKey?: (Uint8Array|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); + /** SampleRowKeysResponse offsetBytes */ + offsetBytes?: (number|Long|string|null); } - /** Represents a CheckAndMutateRowRequest. */ - class CheckAndMutateRowRequest implements ICheckAndMutateRowRequest { + /** Represents a SampleRowKeysResponse. */ + class SampleRowKeysResponse implements ISampleRowKeysResponse { /** - * Constructs a new CheckAndMutateRowRequest. + * Constructs a new SampleRowKeysResponse. * @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; + constructor(properties?: google.bigtable.v2.ISampleRowKeysResponse); - /** CheckAndMutateRowRequest rowKey. */ + /** SampleRowKeysResponse rowKey. */ public rowKey: (Uint8Array|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[]; + /** SampleRowKeysResponse offsetBytes. */ + public offsetBytes: (number|Long|string); /** - * Creates a new CheckAndMutateRowRequest instance using the specified properties. + * Creates a new SampleRowKeysResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CheckAndMutateRowRequest instance + * @returns SampleRowKeysResponse instance */ - public static create(properties?: google.bigtable.v2.ICheckAndMutateRowRequest): google.bigtable.v2.CheckAndMutateRowRequest; + public static create(properties?: google.bigtable.v2.ISampleRowKeysResponse): google.bigtable.v2.SampleRowKeysResponse; /** - * 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 + * 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.ICheckAndMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.ISampleRowKeysResponse, 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 + * 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.ICheckAndMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.ISampleRowKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer. + * 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 CheckAndMutateRowRequest + * @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.CheckAndMutateRowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.SampleRowKeysResponse; /** - * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer, length delimited. + * Decodes a SampleRowKeysResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CheckAndMutateRowRequest + * @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.CheckAndMutateRowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.SampleRowKeysResponse; /** - * Verifies a CheckAndMutateRowRequest message. + * 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 CheckAndMutateRowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SampleRowKeysResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CheckAndMutateRowRequest + * @returns SampleRowKeysResponse */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.CheckAndMutateRowRequest; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SampleRowKeysResponse; /** - * Creates a plain object from a CheckAndMutateRowRequest message. Also converts values to other types if specified. - * @param message CheckAndMutateRowRequest + * 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.CheckAndMutateRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.SampleRowKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CheckAndMutateRowRequest to JSON. + * Converts this SampleRowKeysResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CheckAndMutateRowRequest + * 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 CheckAndMutateRowResponse. */ - interface ICheckAndMutateRowResponse { + /** Properties of a MutateRowRequest. */ + interface IMutateRowRequest { - /** CheckAndMutateRowResponse predicateMatched */ - predicateMatched?: (boolean|null); - } + /** MutateRowRequest tableName */ + tableName?: (string|null); - /** Represents a CheckAndMutateRowResponse. */ - class CheckAndMutateRowResponse implements ICheckAndMutateRowResponse { + /** MutateRowRequest authorizedViewName */ + authorizedViewName?: (string|null); - /** - * Constructs a new CheckAndMutateRowResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ICheckAndMutateRowResponse); + /** MutateRowRequest appProfileId */ + appProfileId?: (string|null); - /** CheckAndMutateRowResponse predicateMatched. */ - public predicateMatched: boolean; + /** MutateRowRequest rowKey */ + rowKey?: (Uint8Array|string|null); + + /** MutateRowRequest mutations */ + mutations?: (google.bigtable.v2.IMutation[]|null); + } + + /** Represents a MutateRowRequest. */ + class MutateRowRequest implements IMutateRowRequest { /** - * Creates a new CheckAndMutateRowResponse instance using the specified properties. + * Constructs a new MutateRowRequest. * @param [properties] Properties to set - * @returns CheckAndMutateRowResponse instance */ - public static create(properties?: google.bigtable.v2.ICheckAndMutateRowResponse): google.bigtable.v2.CheckAndMutateRowResponse; + constructor(properties?: google.bigtable.v2.IMutateRowRequest); - /** - * 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; + /** MutateRowRequest tableName. */ + public tableName: string; + + /** MutateRowRequest authorizedViewName. */ + public authorizedViewName: string; + + /** MutateRowRequest appProfileId. */ + public appProfileId: string; + + /** MutateRowRequest rowKey. */ + public rowKey: (Uint8Array|string); + + /** MutateRowRequest mutations. */ + public mutations: google.bigtable.v2.IMutation[]; /** - * 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 + * 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 encodeDelimited(message: google.bigtable.v2.ICheckAndMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer. + * 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 CheckAndMutateRowResponse + * @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.CheckAndMutateRowResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.MutateRowRequest; /** - * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer, length delimited. + * Decodes a MutateRowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CheckAndMutateRowResponse + * @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.CheckAndMutateRowResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.MutateRowRequest; /** - * Verifies a CheckAndMutateRowResponse message. + * 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 CheckAndMutateRowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MutateRowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CheckAndMutateRowResponse + * @returns MutateRowRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.CheckAndMutateRowResponse; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowRequest; /** - * Creates a plain object from a CheckAndMutateRowResponse message. Also converts values to other types if specified. - * @param message CheckAndMutateRowResponse + * 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.CheckAndMutateRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.MutateRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CheckAndMutateRowResponse to JSON. + * Converts this MutateRowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CheckAndMutateRowResponse + * 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 PingAndWarmRequest. */ - interface IPingAndWarmRequest { - - /** PingAndWarmRequest name */ - name?: (string|null); - - /** PingAndWarmRequest appProfileId */ - appProfileId?: (string|null); + /** Properties of a MutateRowResponse. */ + interface IMutateRowResponse { } - /** Represents a PingAndWarmRequest. */ - class PingAndWarmRequest implements IPingAndWarmRequest { + /** Represents a MutateRowResponse. */ + class MutateRowResponse implements IMutateRowResponse { /** - * Constructs a new PingAndWarmRequest. + * Constructs a new MutateRowResponse. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IPingAndWarmRequest); - - /** PingAndWarmRequest name. */ - public name: string; - - /** PingAndWarmRequest appProfileId. */ - public appProfileId: string; + constructor(properties?: google.bigtable.v2.IMutateRowResponse); /** - * Creates a new PingAndWarmRequest instance using the specified properties. + * Creates a new MutateRowResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PingAndWarmRequest instance + * @returns MutateRowResponse instance */ - public static create(properties?: google.bigtable.v2.IPingAndWarmRequest): google.bigtable.v2.PingAndWarmRequest; + public static create(properties?: google.bigtable.v2.IMutateRowResponse): google.bigtable.v2.MutateRowResponse; /** - * 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 + * 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.IPingAndWarmRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IMutateRowResponse, 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 + * 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.IPingAndWarmRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PingAndWarmRequest message from the specified reader or buffer. + * 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 PingAndWarmRequest + * @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.PingAndWarmRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.MutateRowResponse; /** - * Decodes a PingAndWarmRequest message from the specified reader or buffer, length delimited. + * Decodes a MutateRowResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PingAndWarmRequest + * @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.PingAndWarmRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.MutateRowResponse; /** - * Verifies a PingAndWarmRequest message. + * 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 PingAndWarmRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MutateRowResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PingAndWarmRequest + * @returns MutateRowResponse */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PingAndWarmRequest; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowResponse; /** - * Creates a plain object from a PingAndWarmRequest message. Also converts values to other types if specified. - * @param message PingAndWarmRequest + * 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.PingAndWarmRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.MutateRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PingAndWarmRequest to JSON. + * Converts this MutateRowResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PingAndWarmRequest + * 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 PingAndWarmResponse. */ - interface IPingAndWarmResponse { + /** 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 PingAndWarmResponse. */ - class PingAndWarmResponse implements IPingAndWarmResponse { + /** Represents a MutateRowsRequest. */ + class MutateRowsRequest implements IMutateRowsRequest { /** - * Constructs a new PingAndWarmResponse. + * Constructs a new MutateRowsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IPingAndWarmResponse); + 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 PingAndWarmResponse instance using the specified properties. + * Creates a new MutateRowsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PingAndWarmResponse instance + * @returns MutateRowsRequest instance */ - public static create(properties?: google.bigtable.v2.IPingAndWarmResponse): google.bigtable.v2.PingAndWarmResponse; + public static create(properties?: google.bigtable.v2.IMutateRowsRequest): google.bigtable.v2.MutateRowsRequest; /** - * 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 + * 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.IPingAndWarmResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IMutateRowsRequest, 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 + * 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.IPingAndWarmResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IMutateRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PingAndWarmResponse message from the specified reader or buffer. + * 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 PingAndWarmResponse + * @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.PingAndWarmResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.MutateRowsRequest; /** - * Decodes a PingAndWarmResponse message from the specified reader or buffer, length delimited. + * Decodes a MutateRowsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PingAndWarmResponse + * @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.PingAndWarmResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.MutateRowsRequest; /** - * Verifies a PingAndWarmResponse message. + * 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 PingAndWarmResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MutateRowsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PingAndWarmResponse + * @returns MutateRowsRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PingAndWarmResponse; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsRequest; /** - * Creates a plain object from a PingAndWarmResponse message. Also converts values to other types if specified. - * @param message PingAndWarmResponse + * 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.PingAndWarmResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.MutateRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PingAndWarmResponse to JSON. + * Converts this MutateRowsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PingAndWarmResponse + * 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; } - /** Properties of a ReadModifyWriteRowRequest. */ - interface IReadModifyWriteRowRequest { + namespace MutateRowsRequest { - /** ReadModifyWriteRowRequest tableName */ - tableName?: (string|null); + /** Properties of an Entry. */ + interface IEntry { - /** ReadModifyWriteRowRequest authorizedViewName */ - authorizedViewName?: (string|null); + /** Entry rowKey */ + rowKey?: (Uint8Array|string|null); - /** ReadModifyWriteRowRequest appProfileId */ - appProfileId?: (string|null); + /** Entry mutations */ + mutations?: (google.bigtable.v2.IMutation[]|null); + } - /** ReadModifyWriteRowRequest rowKey */ - rowKey?: (Uint8Array|string|null); + /** Represents an Entry. */ + class Entry implements IEntry { - /** ReadModifyWriteRowRequest rules */ - rules?: (google.bigtable.v2.IReadModifyWriteRule[]|null); - } + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.MutateRowsRequest.IEntry); - /** Represents a ReadModifyWriteRowRequest. */ - class ReadModifyWriteRowRequest implements IReadModifyWriteRowRequest { + /** Entry rowKey. */ + public rowKey: (Uint8Array|string); - /** - * 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|string); - - /** ReadModifyWriteRowRequest rules. */ - public rules: google.bigtable.v2.IReadModifyWriteRule[]; + /** Entry mutations. */ + public mutations: google.bigtable.v2.IMutation[]; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 ReadModifyWriteRowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Entry 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; + /** + * 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 ReadModifyWriteRowResponse. */ - interface IReadModifyWriteRowResponse { + /** Properties of a MutateRowsResponse. */ + interface IMutateRowsResponse { - /** ReadModifyWriteRowResponse row */ - row?: (google.bigtable.v2.IRow|null); + /** MutateRowsResponse entries */ + entries?: (google.bigtable.v2.MutateRowsResponse.IEntry[]|null); + + /** MutateRowsResponse rateLimitInfo */ + rateLimitInfo?: (google.bigtable.v2.IRateLimitInfo|null); } - /** Represents a ReadModifyWriteRowResponse. */ - class ReadModifyWriteRowResponse implements IReadModifyWriteRowResponse { + /** Represents a MutateRowsResponse. */ + class MutateRowsResponse implements IMutateRowsResponse { /** - * Constructs a new ReadModifyWriteRowResponse. + * Constructs a new MutateRowsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IReadModifyWriteRowResponse); + constructor(properties?: google.bigtable.v2.IMutateRowsResponse); - /** ReadModifyWriteRowResponse row. */ - public row?: (google.bigtable.v2.IRow|null); + /** MutateRowsResponse entries. */ + public entries: google.bigtable.v2.MutateRowsResponse.IEntry[]; + + /** MutateRowsResponse rateLimitInfo. */ + public rateLimitInfo?: (google.bigtable.v2.IRateLimitInfo|null); /** - * Creates a new ReadModifyWriteRowResponse instance using the specified properties. + * Creates a new MutateRowsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReadModifyWriteRowResponse instance + * @returns MutateRowsResponse instance */ - public static create(properties?: google.bigtable.v2.IReadModifyWriteRowResponse): google.bigtable.v2.ReadModifyWriteRowResponse; + public static create(properties?: google.bigtable.v2.IMutateRowsResponse): google.bigtable.v2.MutateRowsResponse; /** - * 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 + * 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.IReadModifyWriteRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IMutateRowsResponse, 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 + * 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.IReadModifyWriteRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IMutateRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReadModifyWriteRowResponse message from the specified reader or buffer. + * 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 ReadModifyWriteRowResponse + * @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.ReadModifyWriteRowResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.MutateRowsResponse; /** - * Decodes a ReadModifyWriteRowResponse message from the specified reader or buffer, length delimited. + * Decodes a MutateRowsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReadModifyWriteRowResponse + * @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.ReadModifyWriteRowResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.MutateRowsResponse; /** - * Verifies a ReadModifyWriteRowResponse message. + * 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 ReadModifyWriteRowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MutateRowsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReadModifyWriteRowResponse + * @returns MutateRowsResponse */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadModifyWriteRowResponse; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsResponse; /** - * Creates a plain object from a ReadModifyWriteRowResponse message. Also converts values to other types if specified. - * @param message ReadModifyWriteRowResponse + * 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.ReadModifyWriteRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.MutateRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReadModifyWriteRowResponse to JSON. + * Converts this MutateRowsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ReadModifyWriteRowResponse + * 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; } - /** Properties of a GenerateInitialChangeStreamPartitionsRequest. */ - interface IGenerateInitialChangeStreamPartitionsRequest { - - /** GenerateInitialChangeStreamPartitionsRequest tableName */ - tableName?: (string|null); - - /** GenerateInitialChangeStreamPartitionsRequest appProfileId */ - appProfileId?: (string|null); - } + namespace MutateRowsResponse { - /** Represents a GenerateInitialChangeStreamPartitionsRequest. */ - class GenerateInitialChangeStreamPartitionsRequest implements IGenerateInitialChangeStreamPartitionsRequest { + /** Properties of an Entry. */ + interface IEntry { - /** - * Constructs a new GenerateInitialChangeStreamPartitionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest); + /** Entry index */ + index?: (number|Long|string|null); - /** GenerateInitialChangeStreamPartitionsRequest tableName. */ - public tableName: string; + /** Entry status */ + status?: (google.rpc.IStatus|null); + } - /** GenerateInitialChangeStreamPartitionsRequest appProfileId. */ - public appProfileId: string; + /** 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 { /** - * Creates a new GenerateInitialChangeStreamPartitionsRequest instance using the specified properties. + * Constructs a new RateLimitInfo. * @param [properties] Properties to set - * @returns GenerateInitialChangeStreamPartitionsRequest instance */ - public static create(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest): google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; + constructor(properties?: google.bigtable.v2.IRateLimitInfo); + + /** RateLimitInfo period. */ + public period?: (google.protobuf.IDuration|null); + + /** RateLimitInfo factor. */ + public factor: number; /** - * 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 + * 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.IGenerateInitialChangeStreamPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IRateLimitInfo, 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 + * 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.IGenerateInitialChangeStreamPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IRateLimitInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GenerateInitialChangeStreamPartitionsRequest message from the specified reader or buffer. + * 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 GenerateInitialChangeStreamPartitionsRequest + * @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.GenerateInitialChangeStreamPartitionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.RateLimitInfo; /** - * Decodes a GenerateInitialChangeStreamPartitionsRequest message from the specified reader or buffer, length delimited. + * Decodes a RateLimitInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GenerateInitialChangeStreamPartitionsRequest + * @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.GenerateInitialChangeStreamPartitionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.RateLimitInfo; /** - * Verifies a GenerateInitialChangeStreamPartitionsRequest message. + * 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 GenerateInitialChangeStreamPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RateLimitInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GenerateInitialChangeStreamPartitionsRequest + * @returns RateLimitInfo */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RateLimitInfo; /** - * Creates a plain object from a GenerateInitialChangeStreamPartitionsRequest message. Also converts values to other types if specified. - * @param message GenerateInitialChangeStreamPartitionsRequest + * 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.GenerateInitialChangeStreamPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.RateLimitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GenerateInitialChangeStreamPartitionsRequest to JSON. + * Converts this RateLimitInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GenerateInitialChangeStreamPartitionsRequest + * 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 GenerateInitialChangeStreamPartitionsResponse. */ - interface IGenerateInitialChangeStreamPartitionsResponse { + /** Properties of a CheckAndMutateRowRequest. */ + interface ICheckAndMutateRowRequest { - /** GenerateInitialChangeStreamPartitionsResponse partition */ - partition?: (google.bigtable.v2.IStreamPartition|null); + /** CheckAndMutateRowRequest tableName */ + tableName?: (string|null); + + /** CheckAndMutateRowRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** CheckAndMutateRowRequest appProfileId */ + appProfileId?: (string|null); + + /** CheckAndMutateRowRequest rowKey */ + rowKey?: (Uint8Array|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 GenerateInitialChangeStreamPartitionsResponse. */ - class GenerateInitialChangeStreamPartitionsResponse implements IGenerateInitialChangeStreamPartitionsResponse { + /** Represents a CheckAndMutateRowRequest. */ + class CheckAndMutateRowRequest implements ICheckAndMutateRowRequest { /** - * Constructs a new GenerateInitialChangeStreamPartitionsResponse. + * Constructs a new CheckAndMutateRowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse); + constructor(properties?: google.bigtable.v2.ICheckAndMutateRowRequest); - /** GenerateInitialChangeStreamPartitionsResponse partition. */ - public partition?: (google.bigtable.v2.IStreamPartition|null); + /** CheckAndMutateRowRequest tableName. */ + public tableName: string; + + /** CheckAndMutateRowRequest authorizedViewName. */ + public authorizedViewName: string; + + /** CheckAndMutateRowRequest appProfileId. */ + public appProfileId: string; + + /** CheckAndMutateRowRequest rowKey. */ + public rowKey: (Uint8Array|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 GenerateInitialChangeStreamPartitionsResponse instance using the specified properties. + * Creates a new CheckAndMutateRowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GenerateInitialChangeStreamPartitionsResponse instance + * @returns CheckAndMutateRowRequest instance */ - public static create(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse): google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; + public static create(properties?: google.bigtable.v2.ICheckAndMutateRowRequest): google.bigtable.v2.CheckAndMutateRowRequest; /** - * 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 + * 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.IGenerateInitialChangeStreamPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.ICheckAndMutateRowRequest, 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 + * 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.IGenerateInitialChangeStreamPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.ICheckAndMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GenerateInitialChangeStreamPartitionsResponse message from the specified reader or buffer. + * 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 GenerateInitialChangeStreamPartitionsResponse + * @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.GenerateInitialChangeStreamPartitionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.CheckAndMutateRowRequest; /** - * Decodes a GenerateInitialChangeStreamPartitionsResponse message from the specified reader or buffer, length delimited. + * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GenerateInitialChangeStreamPartitionsResponse + * @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.GenerateInitialChangeStreamPartitionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.CheckAndMutateRowRequest; /** - * Verifies a GenerateInitialChangeStreamPartitionsResponse message. + * 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 GenerateInitialChangeStreamPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CheckAndMutateRowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GenerateInitialChangeStreamPartitionsResponse + * @returns CheckAndMutateRowRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.CheckAndMutateRowRequest; /** - * Creates a plain object from a GenerateInitialChangeStreamPartitionsResponse message. Also converts values to other types if specified. - * @param message GenerateInitialChangeStreamPartitionsResponse + * 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.GenerateInitialChangeStreamPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.CheckAndMutateRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GenerateInitialChangeStreamPartitionsResponse to JSON. + * Converts this CheckAndMutateRowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GenerateInitialChangeStreamPartitionsResponse + * 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 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); + /** Properties of a CheckAndMutateRowResponse. */ + interface ICheckAndMutateRowResponse { - /** ReadChangeStreamRequest heartbeatDuration */ - heartbeatDuration?: (google.protobuf.IDuration|null); + /** CheckAndMutateRowResponse predicateMatched */ + predicateMatched?: (boolean|null); } - /** Represents a ReadChangeStreamRequest. */ - class ReadChangeStreamRequest implements IReadChangeStreamRequest { + /** Represents a CheckAndMutateRowResponse. */ + class CheckAndMutateRowResponse implements ICheckAndMutateRowResponse { /** - * Constructs a new ReadChangeStreamRequest. + * Constructs a new CheckAndMutateRowResponse. * @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); + constructor(properties?: google.bigtable.v2.ICheckAndMutateRowResponse); - /** ReadChangeStreamRequest startFrom. */ - public startFrom?: ("startTime"|"continuationTokens"); + /** CheckAndMutateRowResponse predicateMatched. */ + public predicateMatched: boolean; /** - * Creates a new ReadChangeStreamRequest instance using the specified properties. + * Creates a new CheckAndMutateRowResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReadChangeStreamRequest instance + * @returns CheckAndMutateRowResponse instance */ - public static create(properties?: google.bigtable.v2.IReadChangeStreamRequest): google.bigtable.v2.ReadChangeStreamRequest; + public static create(properties?: google.bigtable.v2.ICheckAndMutateRowResponse): google.bigtable.v2.CheckAndMutateRowResponse; /** - * 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 + * 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.IReadChangeStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.ICheckAndMutateRowResponse, 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 + * 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.IReadChangeStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.ICheckAndMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReadChangeStreamRequest message from the specified reader or buffer. + * 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 ReadChangeStreamRequest + * @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.ReadChangeStreamRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.CheckAndMutateRowResponse; /** - * Decodes a ReadChangeStreamRequest message from the specified reader or buffer, length delimited. + * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReadChangeStreamRequest + * @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.ReadChangeStreamRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.CheckAndMutateRowResponse; /** - * Verifies a ReadChangeStreamRequest message. + * 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 ReadChangeStreamRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CheckAndMutateRowResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReadChangeStreamRequest + * @returns CheckAndMutateRowResponse */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamRequest; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.CheckAndMutateRowResponse; /** - * Creates a plain object from a ReadChangeStreamRequest message. Also converts values to other types if specified. - * @param message ReadChangeStreamRequest + * 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.ReadChangeStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.CheckAndMutateRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReadChangeStreamRequest to JSON. + * Converts this CheckAndMutateRowResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ReadChangeStreamRequest + * 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 ReadChangeStreamResponse. */ - interface IReadChangeStreamResponse { - - /** ReadChangeStreamResponse dataChange */ - dataChange?: (google.bigtable.v2.ReadChangeStreamResponse.IDataChange|null); + /** Properties of a PingAndWarmRequest. */ + interface IPingAndWarmRequest { - /** ReadChangeStreamResponse heartbeat */ - heartbeat?: (google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat|null); + /** PingAndWarmRequest name */ + name?: (string|null); - /** ReadChangeStreamResponse closeStream */ - closeStream?: (google.bigtable.v2.ReadChangeStreamResponse.ICloseStream|null); + /** PingAndWarmRequest appProfileId */ + appProfileId?: (string|null); } - /** Represents a ReadChangeStreamResponse. */ - class ReadChangeStreamResponse implements IReadChangeStreamResponse { + /** Represents a PingAndWarmRequest. */ + class PingAndWarmRequest implements IPingAndWarmRequest { /** - * Constructs a new ReadChangeStreamResponse. + * Constructs a new PingAndWarmRequest. * @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); + constructor(properties?: google.bigtable.v2.IPingAndWarmRequest); - /** ReadChangeStreamResponse closeStream. */ - public closeStream?: (google.bigtable.v2.ReadChangeStreamResponse.ICloseStream|null); + /** PingAndWarmRequest name. */ + public name: string; - /** ReadChangeStreamResponse streamRecord. */ - public streamRecord?: ("dataChange"|"heartbeat"|"closeStream"); + /** PingAndWarmRequest appProfileId. */ + public appProfileId: string; /** - * Creates a new ReadChangeStreamResponse instance using the specified properties. + * Creates a new PingAndWarmRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReadChangeStreamResponse instance + * @returns PingAndWarmRequest instance */ - public static create(properties?: google.bigtable.v2.IReadChangeStreamResponse): google.bigtable.v2.ReadChangeStreamResponse; + public static create(properties?: google.bigtable.v2.IPingAndWarmRequest): google.bigtable.v2.PingAndWarmRequest; /** - * 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 + * 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.IReadChangeStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IPingAndWarmRequest, 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 + * 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.IReadChangeStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IPingAndWarmRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReadChangeStreamResponse message from the specified reader or buffer. + * 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 ReadChangeStreamResponse + * @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.ReadChangeStreamResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.PingAndWarmRequest; /** - * Decodes a ReadChangeStreamResponse message from the specified reader or buffer, length delimited. + * Decodes a PingAndWarmRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReadChangeStreamResponse + * @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.ReadChangeStreamResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.PingAndWarmRequest; /** - * Verifies a ReadChangeStreamResponse message. + * 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 ReadChangeStreamResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PingAndWarmRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReadChangeStreamResponse + * @returns PingAndWarmRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamResponse; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PingAndWarmRequest; /** - * Creates a plain object from a ReadChangeStreamResponse message. Also converts values to other types if specified. - * @param message ReadChangeStreamResponse + * 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.ReadChangeStreamResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.PingAndWarmRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReadChangeStreamResponse to JSON. + * Converts this PingAndWarmRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ReadChangeStreamResponse + * 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; } - namespace ReadChangeStreamResponse { - - /** Properties of a MutationChunk. */ - interface IMutationChunk { - - /** MutationChunk chunkInfo */ - chunkInfo?: (google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo|null); + /** Properties of a PingAndWarmResponse. */ + interface IPingAndWarmResponse { + } - /** MutationChunk mutation */ - mutation?: (google.bigtable.v2.IMutation|null); - } + /** Represents a PingAndWarmResponse. */ + class PingAndWarmResponse implements IPingAndWarmResponse { - /** Represents a MutationChunk. */ - class MutationChunk implements IMutationChunk { + /** + * Constructs a new PingAndWarmResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPingAndWarmResponse); - /** - * Constructs a new MutationChunk. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk); + /** + * 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; - /** MutationChunk chunkInfo. */ - public chunkInfo?: (google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo|null); + /** + * 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; - /** MutationChunk mutation. */ - public mutation?: (google.bigtable.v2.IMutation|null); + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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); - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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 }; - /** - * 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); + /** + * Converts this PingAndWarmResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * 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; + } - /** - * 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 }; + /** Properties of a ReadModifyWriteRowRequest. */ + interface IReadModifyWriteRowRequest { - /** - * Converts this MutationChunk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ReadModifyWriteRowRequest tableName */ + tableName?: (string|null); - /** - * 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; - } + /** ReadModifyWriteRowRequest authorizedViewName */ + authorizedViewName?: (string|null); - namespace MutationChunk { + /** ReadModifyWriteRowRequest appProfileId */ + appProfileId?: (string|null); - /** Properties of a ChunkInfo. */ - interface IChunkInfo { + /** ReadModifyWriteRowRequest rowKey */ + rowKey?: (Uint8Array|string|null); - /** ChunkInfo chunkedValueSize */ - chunkedValueSize?: (number|null); + /** ReadModifyWriteRowRequest rules */ + rules?: (google.bigtable.v2.IReadModifyWriteRule[]|null); + } - /** ChunkInfo chunkedValueOffset */ - chunkedValueOffset?: (number|null); + /** Represents a ReadModifyWriteRowRequest. */ + class ReadModifyWriteRowRequest implements IReadModifyWriteRowRequest { - /** ChunkInfo lastChunk */ - lastChunk?: (boolean|null); - } + /** + * Constructs a new ReadModifyWriteRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadModifyWriteRowRequest); - /** Represents a ChunkInfo. */ - class ChunkInfo implements IChunkInfo { + /** ReadModifyWriteRowRequest tableName. */ + public tableName: string; - /** - * Constructs a new ChunkInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo); + /** ReadModifyWriteRowRequest authorizedViewName. */ + public authorizedViewName: string; - /** ChunkInfo chunkedValueSize. */ - public chunkedValueSize: number; + /** ReadModifyWriteRowRequest appProfileId. */ + public appProfileId: string; - /** ChunkInfo chunkedValueOffset. */ - public chunkedValueOffset: number; + /** ReadModifyWriteRowRequest rowKey. */ + public rowKey: (Uint8Array|string); - /** ChunkInfo lastChunk. */ - public lastChunk: boolean; + /** ReadModifyWriteRowRequest rules. */ + public rules: google.bigtable.v2.IReadModifyWriteRule[]; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 }; + /** + * 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; - /** - * Converts this ChunkInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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 }; - /** - * 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; - } - } + /** + * Converts this ReadModifyWriteRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a DataChange. */ - interface IDataChange { + /** + * 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; + } - /** DataChange type */ - type?: (google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type|keyof typeof google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type|null); + /** Properties of a ReadModifyWriteRowResponse. */ + interface IReadModifyWriteRowResponse { - /** DataChange sourceClusterId */ - sourceClusterId?: (string|null); + /** ReadModifyWriteRowResponse row */ + row?: (google.bigtable.v2.IRow|null); + } - /** DataChange rowKey */ - rowKey?: (Uint8Array|string|null); + /** Represents a ReadModifyWriteRowResponse. */ + class ReadModifyWriteRowResponse implements IReadModifyWriteRowResponse { - /** DataChange commitTimestamp */ - commitTimestamp?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new ReadModifyWriteRowResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadModifyWriteRowResponse); - /** DataChange tiebreaker */ - tiebreaker?: (number|null); + /** ReadModifyWriteRowResponse row. */ + public row?: (google.bigtable.v2.IRow|null); - /** DataChange chunks */ - chunks?: (google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk[]|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; - /** DataChange done */ - done?: (boolean|null); + /** + * 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; - /** DataChange token */ - token?: (string|null); + /** + * 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; - /** DataChange estimatedLowWatermark */ - estimatedLowWatermark?: (google.protobuf.ITimestamp|null); - } + /** + * 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; - /** Represents a DataChange. */ - class DataChange implements IDataChange { + /** + * 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; - /** - * Constructs a new DataChange. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.IDataChange); + /** + * 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); - /** DataChange type. */ - public type: (google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type|keyof typeof google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type); + /** + * 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; - /** DataChange sourceClusterId. */ - public sourceClusterId: string; + /** + * 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 }; - /** DataChange rowKey. */ - public rowKey: (Uint8Array|string); + /** + * Converts this ReadModifyWriteRowResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** DataChange commitTimestamp. */ - public commitTimestamp?: (google.protobuf.ITimestamp|null); + /** + * 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; + } - /** DataChange tiebreaker. */ - public tiebreaker: number; + /** Properties of a GenerateInitialChangeStreamPartitionsRequest. */ + interface IGenerateInitialChangeStreamPartitionsRequest { - /** DataChange chunks. */ - public chunks: google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk[]; + /** GenerateInitialChangeStreamPartitionsRequest tableName */ + tableName?: (string|null); - /** DataChange done. */ - public done: boolean; + /** GenerateInitialChangeStreamPartitionsRequest appProfileId */ + appProfileId?: (string|null); + } - /** DataChange token. */ - public token: string; + /** Represents a GenerateInitialChangeStreamPartitionsRequest. */ + class GenerateInitialChangeStreamPartitionsRequest implements IGenerateInitialChangeStreamPartitionsRequest { - /** DataChange estimatedLowWatermark. */ - public estimatedLowWatermark?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new GenerateInitialChangeStreamPartitionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest); - /** - * 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; + /** GenerateInitialChangeStreamPartitionsRequest tableName. */ + public tableName: string; - /** - * 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; + /** GenerateInitialChangeStreamPartitionsRequest appProfileId. */ + public appProfileId: string; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * Verifies a DataChange message. - * @param message Plain object to verify + /** + * 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|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|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 protoFormat */ + protoFormat?: (google.bigtable.v2.IProtoFormat|null); + + /** ExecuteQueryRequest resumeToken */ + resumeToken?: (Uint8Array|string|null); + + /** ExecuteQueryRequest params */ + params?: ({ [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 protoFormat. */ + public protoFormat?: (google.bigtable.v2.IProtoFormat|null); + + /** ExecuteQueryRequest resumeToken. */ + public resumeToken: (Uint8Array|string); + + /** ExecuteQueryRequest params. */ + public params: { [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 Row. */ + interface IRow { + + /** Row key */ + key?: (Uint8Array|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|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|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|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|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|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|string|null); + + /** Value rawTimestampMicros */ + rawTimestampMicros?: (number|Long|string|null); + + /** Value bytesValue */ + bytesValue?: (Uint8Array|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|string|null); + + /** Value rawTimestampMicros. */ + public rawTimestampMicros?: (number|Long|string|null); + + /** Value bytesValue. */ + public bytesValue?: (Uint8Array|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|string|null); + + /** RowRange startKeyOpen */ + startKeyOpen?: (Uint8Array|string|null); + + /** RowRange endKeyOpen */ + endKeyOpen?: (Uint8Array|string|null); + + /** RowRange endKeyClosed */ + endKeyClosed?: (Uint8Array|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|string|null); + + /** RowRange startKeyOpen. */ + public startKeyOpen?: (Uint8Array|string|null); + + /** RowRange endKeyOpen. */ + public endKeyOpen?: (Uint8Array|string|null); + + /** RowRange endKeyClosed. */ + public endKeyClosed?: (Uint8Array|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|string|null); + + /** ColumnRange startQualifierOpen */ + startQualifierOpen?: (Uint8Array|string|null); + + /** ColumnRange endQualifierClosed */ + endQualifierClosed?: (Uint8Array|string|null); + + /** ColumnRange endQualifierOpen */ + endQualifierOpen?: (Uint8Array|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|string|null); + + /** ColumnRange startQualifierOpen. */ + public startQualifierOpen?: (Uint8Array|string|null); + + /** ColumnRange endQualifierClosed. */ + public endQualifierClosed?: (Uint8Array|string|null); + + /** ColumnRange endQualifierOpen. */ + public endQualifierOpen?: (Uint8Array|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|string|null); + + /** ValueRange startValueOpen */ + startValueOpen?: (Uint8Array|string|null); + + /** ValueRange endValueClosed */ + endValueClosed?: (Uint8Array|string|null); + + /** ValueRange endValueOpen */ + endValueOpen?: (Uint8Array|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|string|null); + + /** ValueRange startValueOpen. */ + public startValueOpen?: (Uint8Array|string|null); + + /** ValueRange endValueClosed. */ + public endValueClosed?: (Uint8Array|string|null); + + /** ValueRange endValueOpen. */ + public endValueOpen?: (Uint8Array|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 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|string|null); + + /** RowFilter rowSampleFilter */ + rowSampleFilter?: (number|null); + + /** RowFilter familyNameRegexFilter */ + familyNameRegexFilter?: (string|null); + + /** RowFilter columnQualifierRegexFilter */ + columnQualifierRegexFilter?: (Uint8Array|string|null); + + /** RowFilter columnRangeFilter */ + columnRangeFilter?: (google.bigtable.v2.IColumnRange|null); + + /** RowFilter timestampRangeFilter */ + timestampRangeFilter?: (google.bigtable.v2.ITimestampRange|null); + + /** RowFilter valueRegexFilter */ + valueRegexFilter?: (Uint8Array|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); + } + + /** 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|string|null); + + /** RowFilter rowSampleFilter. */ + public rowSampleFilter?: (number|null); + + /** RowFilter familyNameRegexFilter. */ + public familyNameRegexFilter?: (string|null); + + /** RowFilter columnQualifierRegexFilter. */ + public columnQualifierRegexFilter?: (Uint8Array|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|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 filter. */ + public filter?: ("chain"|"interleave"|"condition"|"sink"|"passAllFilter"|"blockAllFilter"|"rowKeyRegexFilter"|"rowSampleFilter"|"familyNameRegexFilter"|"columnQualifierRegexFilter"|"columnRangeFilter"|"timestampRangeFilter"|"valueRegexFilter"|"valueRangeFilter"|"cellsPerRowOffsetFilter"|"cellsPerRowLimitFilter"|"cellsPerColumnLimitFilter"|"stripValueTransformer"|"applyLabelTransformer"); + + /** + * 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|string|null); + + /** SetCell timestampMicros */ + timestampMicros?: (number|Long|string|null); + + /** SetCell value */ + value?: (Uint8Array|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|string); + + /** SetCell timestampMicros. */ + public timestampMicros: (number|Long|string); + + /** SetCell value. */ + public value: (Uint8Array|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|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|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 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 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|string|null); + + /** ReadModifyWriteRule appendValue */ + appendValue?: (Uint8Array|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|string); + + /** ReadModifyWriteRule appendValue. */ + public appendValue?: (Uint8Array|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; + } - /** - * 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 }; + /** Properties of a StreamPartition. */ + interface IStreamPartition { - /** - * Converts this DataChange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** StreamPartition rowRange */ + rowRange?: (google.bigtable.v2.IRowRange|null); + } - /** - * 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; - } + /** Represents a StreamPartition. */ + class StreamPartition implements IStreamPartition { - namespace DataChange { + /** + * Constructs a new StreamPartition. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IStreamPartition); - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - USER = 1, - GARBAGE_COLLECTION = 2, - CONTINUATION = 3 - } - } + /** StreamPartition rowRange. */ + public rowRange?: (google.bigtable.v2.IRowRange|null); - /** Properties of a Heartbeat. */ - interface IHeartbeat { + /** + * 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; - /** Heartbeat continuationToken */ - continuationToken?: (google.bigtable.v2.IStreamContinuationToken|null); + /** + * 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; - /** Heartbeat estimatedLowWatermark */ - estimatedLowWatermark?: (google.protobuf.ITimestamp|null); - } + /** + * 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; - /** Represents a Heartbeat. */ - class Heartbeat implements IHeartbeat { + /** + * 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; - /** - * Constructs a new Heartbeat. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat); + /** + * 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; - /** Heartbeat continuationToken. */ - public continuationToken?: (google.bigtable.v2.IStreamContinuationToken|null); + /** + * 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); - /** Heartbeat estimatedLowWatermark. */ - public estimatedLowWatermark?: (google.protobuf.ITimestamp|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 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; + /** + * 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 }; - /** - * 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; + /** + * 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); - /** - * 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; + /** StreamContinuationToken token */ + token?: (string|null); + } - /** - * 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; + /** Represents a StreamContinuationToken. */ + class StreamContinuationToken implements IStreamContinuationToken { - /** - * 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; + /** + * Constructs a new StreamContinuationToken. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IStreamContinuationToken); - /** - * 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); + /** StreamContinuationToken partition. */ + public partition?: (google.bigtable.v2.IStreamPartition|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; + /** StreamContinuationToken token. */ + public token: string; - /** - * 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 }; + /** + * 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; - /** - * Converts this Heartbeat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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; - /** Properties of a CloseStream. */ - interface ICloseStream { + /** + * 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; - /** CloseStream status */ - status?: (google.rpc.IStatus|null); + /** + * 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; - /** CloseStream continuationTokens */ - continuationTokens?: (google.bigtable.v2.IStreamContinuationToken[]|null); + /** + * 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); - /** CloseStream newPartitions */ - newPartitions?: (google.bigtable.v2.IStreamPartition[]|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; - /** Represents a CloseStream. */ - class CloseStream implements ICloseStream { + /** + * 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 }; - /** - * Constructs a new CloseStream. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.ICloseStream); + /** + * Converts this StreamContinuationToken to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** CloseStream status. */ - public status?: (google.rpc.IStatus|null); + /** + * 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; + } - /** CloseStream continuationTokens. */ - public continuationTokens: google.bigtable.v2.IStreamContinuationToken[]; + /** Properties of a ProtoFormat. */ + interface IProtoFormat { + } - /** CloseStream newPartitions. */ - public newPartitions: google.bigtable.v2.IStreamPartition[]; + /** Represents a ProtoFormat. */ + class ProtoFormat implements IProtoFormat { - /** - * 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; + /** + * Constructs a new ProtoFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IProtoFormat); - /** - * 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; + /** + * 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 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; + /** + * 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; - /** - * 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; + /** + * 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 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * 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 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 }; + /** + * 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 CloseStream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ProtoFormat 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; - } + /** + * 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 Row. */ - interface IRow { + /** Properties of a ColumnMetadata. */ + interface IColumnMetadata { - /** Row key */ - key?: (Uint8Array|string|null); + /** ColumnMetadata name */ + name?: (string|null); - /** Row families */ - families?: (google.bigtable.v2.IFamily[]|null); + /** ColumnMetadata type */ + type?: (google.bigtable.v2.IType|null); } - /** Represents a Row. */ - class Row implements IRow { + /** Represents a ColumnMetadata. */ + class ColumnMetadata implements IColumnMetadata { /** - * Constructs a new Row. + * Constructs a new ColumnMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IRow); + constructor(properties?: google.bigtable.v2.IColumnMetadata); - /** Row key. */ - public key: (Uint8Array|string); + /** ColumnMetadata name. */ + public name: string; - /** Row families. */ - public families: google.bigtable.v2.IFamily[]; + /** ColumnMetadata type. */ + public type?: (google.bigtable.v2.IType|null); /** - * Creates a new Row instance using the specified properties. + * Creates a new ColumnMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Row instance + * @returns ColumnMetadata instance */ - public static create(properties?: google.bigtable.v2.IRow): google.bigtable.v2.Row; + public static create(properties?: google.bigtable.v2.IColumnMetadata): google.bigtable.v2.ColumnMetadata; /** - * 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 + * 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.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IColumnMetadata, 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 + * 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.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IColumnMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Row message from the specified reader or buffer. + * 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 Row + * @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.Row; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.ColumnMetadata; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a ColumnMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Row + * @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.Row; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.ColumnMetadata; /** - * Verifies a Row message. + * 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 Row message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Row + * @returns ColumnMetadata */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Row; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ColumnMetadata; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row + * 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.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.ColumnMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Row to JSON. + * Converts this ColumnMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Row + * 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 Family. */ - interface IFamily { - - /** Family name */ - name?: (string|null); + /** Properties of a ProtoSchema. */ + interface IProtoSchema { - /** Family columns */ - columns?: (google.bigtable.v2.IColumn[]|null); + /** ProtoSchema columns */ + columns?: (google.bigtable.v2.IColumnMetadata[]|null); } - /** Represents a Family. */ - class Family implements IFamily { + /** Represents a ProtoSchema. */ + class ProtoSchema implements IProtoSchema { /** - * Constructs a new Family. + * Constructs a new ProtoSchema. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IFamily); + constructor(properties?: google.bigtable.v2.IProtoSchema); - /** Family name. */ - public name: string; - - /** Family columns. */ - public columns: google.bigtable.v2.IColumn[]; + /** ProtoSchema columns. */ + public columns: google.bigtable.v2.IColumnMetadata[]; /** - * Creates a new Family instance using the specified properties. + * Creates a new ProtoSchema instance using the specified properties. * @param [properties] Properties to set - * @returns Family instance + * @returns ProtoSchema instance */ - public static create(properties?: google.bigtable.v2.IFamily): google.bigtable.v2.Family; + public static create(properties?: google.bigtable.v2.IProtoSchema): google.bigtable.v2.ProtoSchema; /** - * 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 + * 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.IFamily, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IProtoSchema, 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 + * 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.IFamily, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IProtoSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Family message from the specified reader or buffer. + * 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 Family + * @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.Family; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.ProtoSchema; /** - * Decodes a Family message from the specified reader or buffer, length delimited. + * Decodes a ProtoSchema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Family + * @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.Family; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.ProtoSchema; /** - * Verifies a Family message. + * 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 Family message from a plain object. Also converts values to their respective internal types. + * Creates a ProtoSchema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Family + * @returns ProtoSchema */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Family; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ProtoSchema; /** - * Creates a plain object from a Family message. Also converts values to other types if specified. - * @param message Family + * 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.Family, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.ProtoSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Family to JSON. + * Converts this ProtoSchema to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Family + * 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 Column. */ - interface IColumn { - - /** Column qualifier */ - qualifier?: (Uint8Array|string|null); + /** Properties of a ResultSetMetadata. */ + interface IResultSetMetadata { - /** Column cells */ - cells?: (google.bigtable.v2.ICell[]|null); + /** ResultSetMetadata protoSchema */ + protoSchema?: (google.bigtable.v2.IProtoSchema|null); } - /** Represents a Column. */ - class Column implements IColumn { + /** Represents a ResultSetMetadata. */ + class ResultSetMetadata implements IResultSetMetadata { /** - * Constructs a new Column. + * Constructs a new ResultSetMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IColumn); + constructor(properties?: google.bigtable.v2.IResultSetMetadata); - /** Column qualifier. */ - public qualifier: (Uint8Array|string); + /** ResultSetMetadata protoSchema. */ + public protoSchema?: (google.bigtable.v2.IProtoSchema|null); - /** Column cells. */ - public cells: google.bigtable.v2.ICell[]; + /** ResultSetMetadata schema. */ + public schema?: "protoSchema"; /** - * Creates a new Column instance using the specified properties. + * Creates a new ResultSetMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Column instance + * @returns ResultSetMetadata instance */ - public static create(properties?: google.bigtable.v2.IColumn): google.bigtable.v2.Column; + public static create(properties?: google.bigtable.v2.IResultSetMetadata): google.bigtable.v2.ResultSetMetadata; /** - * 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 + * 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.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IResultSetMetadata, 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 + * 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.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IResultSetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Column message from the specified reader or buffer. + * 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 Column + * @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.Column; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.ResultSetMetadata; /** - * Decodes a Column message from the specified reader or buffer, length delimited. + * Decodes a ResultSetMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Column + * @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.Column; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.ResultSetMetadata; /** - * Verifies a Column message. + * 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 Column message from a plain object. Also converts values to their respective internal types. + * Creates a ResultSetMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Column + * @returns ResultSetMetadata */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Column; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ResultSetMetadata; /** - * Creates a plain object from a Column message. Also converts values to other types if specified. - * @param message Column + * 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.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.ResultSetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Column to JSON. + * Converts this ResultSetMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Column + * 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 Cell. */ - interface ICell { - - /** Cell timestampMicros */ - timestampMicros?: (number|Long|string|null); - - /** Cell value */ - value?: (Uint8Array|string|null); + /** Properties of a ProtoRows. */ + interface IProtoRows { - /** Cell labels */ - labels?: (string[]|null); + /** ProtoRows values */ + values?: (google.bigtable.v2.IValue[]|null); } - /** Represents a Cell. */ - class Cell implements ICell { + /** Represents a ProtoRows. */ + class ProtoRows implements IProtoRows { /** - * Constructs a new Cell. + * Constructs a new ProtoRows. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.ICell); - - /** Cell timestampMicros. */ - public timestampMicros: (number|Long|string); - - /** Cell value. */ - public value: (Uint8Array|string); + constructor(properties?: google.bigtable.v2.IProtoRows); - /** Cell labels. */ - public labels: string[]; + /** ProtoRows values. */ + public values: google.bigtable.v2.IValue[]; /** - * Creates a new Cell instance using the specified properties. + * Creates a new ProtoRows instance using the specified properties. * @param [properties] Properties to set - * @returns Cell instance + * @returns ProtoRows instance */ - public static create(properties?: google.bigtable.v2.ICell): google.bigtable.v2.Cell; + public static create(properties?: google.bigtable.v2.IProtoRows): google.bigtable.v2.ProtoRows; /** - * 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 + * 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.ICell, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IProtoRows, 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 + * 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.ICell, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IProtoRows, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Cell message from the specified reader or buffer. + * 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 Cell + * @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.Cell; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.ProtoRows; /** - * Decodes a Cell message from the specified reader or buffer, length delimited. + * Decodes a ProtoRows message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Cell + * @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.Cell; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.ProtoRows; /** - * Verifies a Cell message. + * 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 Cell message from a plain object. Also converts values to their respective internal types. + * Creates a ProtoRows message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Cell + * @returns ProtoRows */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Cell; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ProtoRows; /** - * Creates a plain object from a Cell message. Also converts values to other types if specified. - * @param message Cell + * 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.Cell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.ProtoRows, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Cell to JSON. + * Converts this ProtoRows to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Cell + * 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 Value. */ - interface IValue { - - /** Value rawValue */ - rawValue?: (Uint8Array|string|null); - - /** Value rawTimestampMicros */ - rawTimestampMicros?: (number|Long|string|null); + /** Properties of a ProtoRowsBatch. */ + interface IProtoRowsBatch { - /** Value intValue */ - intValue?: (number|Long|string|null); + /** ProtoRowsBatch batchData */ + batchData?: (Uint8Array|string|null); } - /** Represents a Value. */ - class Value implements IValue { + /** Represents a ProtoRowsBatch. */ + class ProtoRowsBatch implements IProtoRowsBatch { /** - * Constructs a new Value. + * Constructs a new ProtoRowsBatch. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IValue); - - /** Value rawValue. */ - public rawValue?: (Uint8Array|string|null); - - /** Value rawTimestampMicros. */ - public rawTimestampMicros?: (number|Long|string|null); - - /** Value intValue. */ - public intValue?: (number|Long|string|null); + constructor(properties?: google.bigtable.v2.IProtoRowsBatch); - /** Value kind. */ - public kind?: ("rawValue"|"rawTimestampMicros"|"intValue"); + /** ProtoRowsBatch batchData. */ + public batchData: (Uint8Array|string); /** - * Creates a new Value instance using the specified properties. + * Creates a new ProtoRowsBatch instance using the specified properties. * @param [properties] Properties to set - * @returns Value instance + * @returns ProtoRowsBatch instance */ - public static create(properties?: google.bigtable.v2.IValue): google.bigtable.v2.Value; + public static create(properties?: google.bigtable.v2.IProtoRowsBatch): google.bigtable.v2.ProtoRowsBatch; /** - * 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 + * 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.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IProtoRowsBatch, 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 + * 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.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IProtoRowsBatch, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Value message from the specified reader or buffer. + * 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 Value + * @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.Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.ProtoRowsBatch; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes a ProtoRowsBatch message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Value + * @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.Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.ProtoRowsBatch; /** - * Verifies a Value message. + * 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 Value message from a plain object. Also converts values to their respective internal types. + * Creates a ProtoRowsBatch message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Value + * @returns ProtoRowsBatch */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Value; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ProtoRowsBatch; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value + * 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.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.ProtoRowsBatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Value to JSON. + * Converts this ProtoRowsBatch to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Value + * 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 RowRange. */ - interface IRowRange { - - /** RowRange startKeyClosed */ - startKeyClosed?: (Uint8Array|string|null); + /** Properties of a PartialResultSet. */ + interface IPartialResultSet { - /** RowRange startKeyOpen */ - startKeyOpen?: (Uint8Array|string|null); + /** PartialResultSet protoRowsBatch */ + protoRowsBatch?: (google.bigtable.v2.IProtoRowsBatch|null); - /** RowRange endKeyOpen */ - endKeyOpen?: (Uint8Array|string|null); + /** PartialResultSet resumeToken */ + resumeToken?: (Uint8Array|string|null); - /** RowRange endKeyClosed */ - endKeyClosed?: (Uint8Array|string|null); + /** PartialResultSet estimatedBatchSize */ + estimatedBatchSize?: (number|null); } - /** Represents a RowRange. */ - class RowRange implements IRowRange { + /** Represents a PartialResultSet. */ + class PartialResultSet implements IPartialResultSet { /** - * Constructs a new RowRange. + * Constructs a new PartialResultSet. * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IRowRange); - - /** RowRange startKeyClosed. */ - public startKeyClosed?: (Uint8Array|string|null); - - /** RowRange startKeyOpen. */ - public startKeyOpen?: (Uint8Array|string|null); + */ + constructor(properties?: google.bigtable.v2.IPartialResultSet); - /** RowRange endKeyOpen. */ - public endKeyOpen?: (Uint8Array|string|null); + /** PartialResultSet protoRowsBatch. */ + public protoRowsBatch?: (google.bigtable.v2.IProtoRowsBatch|null); - /** RowRange endKeyClosed. */ - public endKeyClosed?: (Uint8Array|string|null); + /** PartialResultSet resumeToken. */ + public resumeToken: (Uint8Array|string); - /** RowRange startKey. */ - public startKey?: ("startKeyClosed"|"startKeyOpen"); + /** PartialResultSet estimatedBatchSize. */ + public estimatedBatchSize: number; - /** RowRange endKey. */ - public endKey?: ("endKeyOpen"|"endKeyClosed"); + /** PartialResultSet partialRows. */ + public partialRows?: "protoRowsBatch"; /** - * Creates a new RowRange instance using the specified properties. + * Creates a new PartialResultSet instance using the specified properties. * @param [properties] Properties to set - * @returns RowRange instance + * @returns PartialResultSet instance */ - public static create(properties?: google.bigtable.v2.IRowRange): google.bigtable.v2.RowRange; + public static create(properties?: google.bigtable.v2.IPartialResultSet): google.bigtable.v2.PartialResultSet; /** - * 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 + * 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.IRowRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IPartialResultSet, 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 + * 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.IRowRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IPartialResultSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RowRange message from the specified reader or buffer. + * 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 RowRange + * @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.RowRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.PartialResultSet; /** - * Decodes a RowRange message from the specified reader or buffer, length delimited. + * Decodes a PartialResultSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RowRange + * @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.RowRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.PartialResultSet; /** - * Verifies a RowRange message. + * 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 RowRange message from a plain object. Also converts values to their respective internal types. + * Creates a PartialResultSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RowRange + * @returns PartialResultSet */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowRange; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PartialResultSet; /** - * Creates a plain object from a RowRange message. Also converts values to other types if specified. - * @param message RowRange + * 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.RowRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.PartialResultSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RowRange to JSON. + * Converts this PartialResultSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RowRange + * 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 a RowSet. */ - interface IRowSet { + /** Properties of a Type. */ + interface IType { - /** RowSet rowKeys */ - rowKeys?: (Uint8Array[]|null); + /** Type bytesType */ + bytesType?: (google.bigtable.v2.Type.IBytes|null); - /** RowSet rowRanges */ - rowRanges?: (google.bigtable.v2.IRowRange[]|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); } - /** Represents a RowSet. */ - class RowSet implements IRowSet { + /** Represents a Type. */ + class Type implements IType { /** - * Constructs a new RowSet. + * Constructs a new Type. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.IRowSet); + constructor(properties?: google.bigtable.v2.IType); - /** RowSet rowKeys. */ - public rowKeys: Uint8Array[]; + /** Type bytesType. */ + public bytesType?: (google.bigtable.v2.Type.IBytes|null); - /** RowSet rowRanges. */ - public rowRanges: google.bigtable.v2.IRowRange[]; + /** 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 kind. */ + public kind?: ("bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"); /** - * Creates a new RowSet instance using the specified properties. + * Creates a new Type instance using the specified properties. * @param [properties] Properties to set - * @returns RowSet instance + * @returns Type instance */ - public static create(properties?: google.bigtable.v2.IRowSet): google.bigtable.v2.RowSet; + public static create(properties?: google.bigtable.v2.IType): google.bigtable.v2.Type; /** - * 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 + * 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.IRowSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.IType, 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 + * 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.IRowSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.IType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RowSet message from the specified reader or buffer. + * 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 RowSet + * @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.RowSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type; /** - * Decodes a RowSet message from the specified reader or buffer, length delimited. + * Decodes a Type message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RowSet + * @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.RowSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type; /** - * Verifies a RowSet message. + * 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 RowSet message from a plain object. Also converts values to their respective internal types. + * Creates a Type message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RowSet + * @returns Type */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowSet; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type; /** - * Creates a plain object from a RowSet message. Also converts values to other types if specified. - * @param message RowSet + * 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.RowSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.Type, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RowSet to JSON. + * Converts this Type to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RowSet + * 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; } - /** Properties of a ColumnRange. */ - interface IColumnRange { + namespace Type { - /** ColumnRange familyName */ - familyName?: (string|null); + /** Properties of a Bytes. */ + interface IBytes { - /** ColumnRange startQualifierClosed */ - startQualifierClosed?: (Uint8Array|string|null); + /** Bytes encoding */ + encoding?: (google.bigtable.v2.Type.Bytes.IEncoding|null); + } - /** ColumnRange startQualifierOpen */ - startQualifierOpen?: (Uint8Array|string|null); + /** Represents a Bytes. */ + class Bytes implements IBytes { - /** ColumnRange endQualifierClosed */ - endQualifierClosed?: (Uint8Array|string|null); + /** + * Constructs a new Bytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IBytes); - /** ColumnRange endQualifierOpen */ - endQualifierOpen?: (Uint8Array|string|null); - } + /** 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 { + } + + /** 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); + + /** + * 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; - /** Represents a ColumnRange. */ - class ColumnRange implements IColumnRange { + /** + * 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; - /** - * Constructs a new ColumnRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IColumnRange); + /** + * 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); - /** ColumnRange familyName. */ - public familyName: string; + /** + * 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; - /** ColumnRange startQualifierClosed. */ - public startQualifierClosed?: (Uint8Array|string|null); + /** + * 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 }; - /** ColumnRange startQualifierOpen. */ - public startQualifierOpen?: (Uint8Array|string|null); + /** + * Converts this Raw to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ColumnRange endQualifierClosed. */ - public endQualifierClosed?: (Uint8Array|string|null); + /** + * 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; + } + } + } - /** ColumnRange endQualifierOpen. */ - public endQualifierOpen?: (Uint8Array|string|null); + /** Properties of a String. */ + interface IString { - /** ColumnRange startQualifier. */ - public startQualifier?: ("startQualifierClosed"|"startQualifierOpen"); + /** String encoding */ + encoding?: (google.bigtable.v2.Type.String.IEncoding|null); + } - /** ColumnRange endQualifier. */ - public endQualifier?: ("endQualifierClosed"|"endQualifierOpen"); + /** Represents a String. */ + class String implements IString { - /** - * 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; + /** + * Constructs a new String. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IString); - /** - * 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; + /** String encoding. */ + public encoding?: (google.bigtable.v2.Type.String.IEncoding|null); - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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 }; + /** + * 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); - /** - * Converts this ColumnRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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 }; - /** Properties of a TimestampRange. */ - interface ITimestampRange { + /** + * Converts this String to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** TimestampRange startTimestampMicros */ - startTimestampMicros?: (number|Long|string|null); + /** + * 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; + } - /** TimestampRange endTimestampMicros */ - endTimestampMicros?: (number|Long|string|null); - } + namespace String { - /** Represents a TimestampRange. */ - class TimestampRange implements ITimestampRange { + /** Properties of an Encoding. */ + interface IEncoding { - /** - * Constructs a new TimestampRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.ITimestampRange); + /** Encoding utf8Raw */ + utf8Raw?: (google.bigtable.v2.Type.String.Encoding.IUtf8Raw|null); - /** TimestampRange startTimestampMicros. */ - public startTimestampMicros: (number|Long|string); + /** Encoding utf8Bytes */ + utf8Bytes?: (google.bigtable.v2.Type.String.Encoding.IUtf8Bytes|null); + } - /** TimestampRange endTimestampMicros. */ - public endTimestampMicros: (number|Long|string); + /** Represents an Encoding. */ + class Encoding implements IEncoding { - /** - * 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; + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.String.IEncoding); - /** - * 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; + /** Encoding utf8Raw. */ + public utf8Raw?: (google.bigtable.v2.Type.String.Encoding.IUtf8Raw|null); - /** - * 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; + /** Encoding utf8Bytes. */ + public utf8Bytes?: (google.bigtable.v2.Type.String.Encoding.IUtf8Bytes|null); - /** - * 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; + /** Encoding encoding. */ + public encoding?: ("utf8Raw"|"utf8Bytes"); - /** - * 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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 }; + /** + * 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; - /** - * Converts this TimestampRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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); - /** - * 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; - } + /** + * 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; - /** Properties of a ValueRange. */ - interface IValueRange { + /** + * 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 }; - /** ValueRange startValueClosed */ - startValueClosed?: (Uint8Array|string|null); + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ValueRange startValueOpen */ - startValueOpen?: (Uint8Array|string|null); + /** + * 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; + } - /** ValueRange endValueClosed */ - endValueClosed?: (Uint8Array|string|null); + namespace Encoding { - /** ValueRange endValueOpen */ - endValueOpen?: (Uint8Array|string|null); - } + /** Properties of an Utf8Raw. */ + interface IUtf8Raw { + } - /** Represents a ValueRange. */ - class ValueRange implements IValueRange { + /** Represents an Utf8Raw. */ + class Utf8Raw implements IUtf8Raw { - /** - * Constructs a new ValueRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IValueRange); + /** + * Constructs a new Utf8Raw. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.String.Encoding.IUtf8Raw); - /** ValueRange startValueClosed. */ - public startValueClosed?: (Uint8Array|string|null); + /** + * 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; - /** ValueRange startValueOpen. */ - public startValueOpen?: (Uint8Array|string|null); + /** + * 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; - /** ValueRange endValueClosed. */ - public endValueClosed?: (Uint8Array|string|null); + /** + * 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; - /** ValueRange endValueOpen. */ - public endValueOpen?: (Uint8Array|string|null); + /** + * 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; - /** ValueRange startValue. */ - public startValue?: ("startValueClosed"|"startValueOpen"); + /** + * 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; - /** ValueRange endValue. */ - public endValue?: ("endValueClosed"|"endValueOpen"); + /** + * 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 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; + /** + * 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; - /** - * 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; + /** + * 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 }; - /** - * 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; + /** + * Converts this Utf8Raw to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * 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; + } - /** - * 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; + /** Properties of an Utf8Bytes. */ + interface IUtf8Bytes { + } - /** - * 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); + /** Represents an Utf8Bytes. */ + class Utf8Bytes implements IUtf8Bytes { - /** - * 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; + /** + * Constructs a new Utf8Bytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.String.Encoding.IUtf8Bytes); - /** - * 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 }; + /** + * 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; - /** - * Converts this ValueRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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; - /** Properties of a RowFilter. */ - interface IRowFilter { + /** + * 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; - /** RowFilter chain */ - chain?: (google.bigtable.v2.RowFilter.IChain|null); + /** + * 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; - /** RowFilter interleave */ - interleave?: (google.bigtable.v2.RowFilter.IInterleave|null); + /** + * 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); - /** RowFilter condition */ - condition?: (google.bigtable.v2.RowFilter.ICondition|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; - /** RowFilter sink */ - sink?: (boolean|null); + /** + * 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 }; - /** RowFilter passAllFilter */ - passAllFilter?: (boolean|null); + /** + * Converts this Utf8Bytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RowFilter blockAllFilter */ - blockAllFilter?: (boolean|null); + /** + * 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; + } + } + } - /** RowFilter rowKeyRegexFilter */ - rowKeyRegexFilter?: (Uint8Array|string|null); + /** Properties of an Int64. */ + interface IInt64 { - /** RowFilter rowSampleFilter */ - rowSampleFilter?: (number|null); + /** Int64 encoding */ + encoding?: (google.bigtable.v2.Type.Int64.IEncoding|null); + } - /** RowFilter familyNameRegexFilter */ - familyNameRegexFilter?: (string|null); + /** Represents an Int64. */ + class Int64 implements IInt64 { - /** RowFilter columnQualifierRegexFilter */ - columnQualifierRegexFilter?: (Uint8Array|string|null); + /** + * Constructs a new Int64. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IInt64); - /** RowFilter columnRangeFilter */ - columnRangeFilter?: (google.bigtable.v2.IColumnRange|null); + /** Int64 encoding. */ + public encoding?: (google.bigtable.v2.Type.Int64.IEncoding|null); - /** RowFilter timestampRangeFilter */ - timestampRangeFilter?: (google.bigtable.v2.ITimestampRange|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; - /** RowFilter valueRegexFilter */ - valueRegexFilter?: (Uint8Array|string|null); + /** + * 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; - /** RowFilter valueRangeFilter */ - valueRangeFilter?: (google.bigtable.v2.IValueRange|null); + /** + * 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; - /** RowFilter cellsPerRowOffsetFilter */ - cellsPerRowOffsetFilter?: (number|null); + /** + * 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; - /** RowFilter cellsPerRowLimitFilter */ - cellsPerRowLimitFilter?: (number|null); + /** + * 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; - /** RowFilter cellsPerColumnLimitFilter */ - cellsPerColumnLimitFilter?: (number|null); + /** + * 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); - /** RowFilter stripValueTransformer */ - stripValueTransformer?: (boolean|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; - /** RowFilter applyLabelTransformer */ - applyLabelTransformer?: (string|null); - } + /** + * 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 }; - /** Represents a RowFilter. */ - class RowFilter implements IRowFilter { + /** + * Converts this Int64 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new RowFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IRowFilter); + /** + * 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; + } - /** RowFilter chain. */ - public chain?: (google.bigtable.v2.RowFilter.IChain|null); + namespace Int64 { - /** RowFilter interleave. */ - public interleave?: (google.bigtable.v2.RowFilter.IInterleave|null); + /** Properties of an Encoding. */ + interface IEncoding { - /** RowFilter condition. */ - public condition?: (google.bigtable.v2.RowFilter.ICondition|null); + /** Encoding bigEndianBytes */ + bigEndianBytes?: (google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes|null); + } - /** RowFilter sink. */ - public sink?: (boolean|null); + /** Represents an Encoding. */ + class Encoding implements IEncoding { - /** RowFilter passAllFilter. */ - public passAllFilter?: (boolean|null); + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Int64.IEncoding); - /** RowFilter blockAllFilter. */ - public blockAllFilter?: (boolean|null); + /** Encoding bigEndianBytes. */ + public bigEndianBytes?: (google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes|null); - /** RowFilter rowKeyRegexFilter. */ - public rowKeyRegexFilter?: (Uint8Array|string|null); + /** Encoding encoding. */ + public encoding?: "bigEndianBytes"; - /** RowFilter rowSampleFilter. */ - public rowSampleFilter?: (number|null); + /** + * 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; - /** RowFilter familyNameRegexFilter. */ - public familyNameRegexFilter?: (string|null); + /** + * 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; - /** RowFilter columnQualifierRegexFilter. */ - public columnQualifierRegexFilter?: (Uint8Array|string|null); + /** + * 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; - /** RowFilter columnRangeFilter. */ - public columnRangeFilter?: (google.bigtable.v2.IColumnRange|null); + /** + * 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; - /** RowFilter timestampRangeFilter. */ - public timestampRangeFilter?: (google.bigtable.v2.ITimestampRange|null); + /** + * 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; - /** RowFilter valueRegexFilter. */ - public valueRegexFilter?: (Uint8Array|string|null); + /** + * 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); - /** RowFilter valueRangeFilter. */ - public valueRangeFilter?: (google.bigtable.v2.IValueRange|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; - /** RowFilter cellsPerRowOffsetFilter. */ - public cellsPerRowOffsetFilter?: (number|null); + /** + * 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 }; - /** RowFilter cellsPerRowLimitFilter. */ - public cellsPerRowLimitFilter?: (number|null); + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RowFilter cellsPerColumnLimitFilter. */ - public cellsPerColumnLimitFilter?: (number|null); + /** + * 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; + } - /** RowFilter stripValueTransformer. */ - public stripValueTransformer?: (boolean|null); + namespace Encoding { - /** RowFilter applyLabelTransformer. */ - public applyLabelTransformer?: (string|null); + /** Properties of a BigEndianBytes. */ + interface IBigEndianBytes { - /** RowFilter filter. */ - public filter?: ("chain"|"interleave"|"condition"|"sink"|"passAllFilter"|"blockAllFilter"|"rowKeyRegexFilter"|"rowSampleFilter"|"familyNameRegexFilter"|"columnQualifierRegexFilter"|"columnRangeFilter"|"timestampRangeFilter"|"valueRegexFilter"|"valueRangeFilter"|"cellsPerRowOffsetFilter"|"cellsPerRowLimitFilter"|"cellsPerColumnLimitFilter"|"stripValueTransformer"|"applyLabelTransformer"); + /** BigEndianBytes bytesType */ + bytesType?: (google.bigtable.v2.Type.IBytes|null); + } - /** - * 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; + /** Represents a BigEndianBytes. */ + class BigEndianBytes implements IBigEndianBytes { - /** - * 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; + /** + * Constructs a new BigEndianBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes); - /** - * 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; + /** BigEndianBytes bytesType. */ + public bytesType?: (google.bigtable.v2.Type.IBytes|null); - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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 }; + /** + * 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); - /** - * Converts this RowFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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 }; - namespace RowFilter { + /** + * Converts this BigEndianBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a Chain. */ - interface IChain { + /** + * 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; + } + } + } - /** Chain filters */ - filters?: (google.bigtable.v2.IRowFilter[]|null); + /** Properties of a Bool. */ + interface IBool { } - /** Represents a Chain. */ - class Chain implements IChain { + /** Represents a Bool. */ + class Bool implements IBool { /** - * Constructs a new Chain. + * Constructs a new Bool. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.RowFilter.IChain); - - /** Chain filters. */ - public filters: google.bigtable.v2.IRowFilter[]; + constructor(properties?: google.bigtable.v2.Type.IBool); /** - * Creates a new Chain instance using the specified properties. + * Creates a new Bool instance using the specified properties. * @param [properties] Properties to set - * @returns Chain instance + * @returns Bool instance */ - public static create(properties?: google.bigtable.v2.RowFilter.IChain): google.bigtable.v2.RowFilter.Chain; + public static create(properties?: google.bigtable.v2.Type.IBool): google.bigtable.v2.Type.Bool; /** - * 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 + * 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.RowFilter.IChain, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.Type.IBool, 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 + * 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.RowFilter.IChain, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.Type.IBool, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Chain message from the specified reader or buffer. + * 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 Chain + * @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.RowFilter.Chain; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Bool; /** - * Decodes a Chain message from the specified reader or buffer, length delimited. + * Decodes a Bool message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Chain + * @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.RowFilter.Chain; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Bool; /** - * Verifies a Chain message. + * 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 Chain message from a plain object. Also converts values to their respective internal types. + * Creates a Bool message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Chain + * @returns Bool */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowFilter.Chain; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Bool; /** - * Creates a plain object from a Chain message. Also converts values to other types if specified. - * @param message Chain + * 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.RowFilter.Chain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.Type.Bool, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Chain to JSON. + * Converts this Bool to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Chain + * 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 an Interleave. */ - interface IInterleave { - - /** Interleave filters */ - filters?: (google.bigtable.v2.IRowFilter[]|null); + /** Properties of a Float32. */ + interface IFloat32 { } - /** Represents an Interleave. */ - class Interleave implements IInterleave { + /** Represents a Float32. */ + class Float32 implements IFloat32 { /** - * Constructs a new Interleave. + * Constructs a new Float32. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.RowFilter.IInterleave); - - /** Interleave filters. */ - public filters: google.bigtable.v2.IRowFilter[]; + constructor(properties?: google.bigtable.v2.Type.IFloat32); /** - * Creates a new Interleave instance using the specified properties. + * Creates a new Float32 instance using the specified properties. * @param [properties] Properties to set - * @returns Interleave instance + * @returns Float32 instance */ - public static create(properties?: google.bigtable.v2.RowFilter.IInterleave): google.bigtable.v2.RowFilter.Interleave; + public static create(properties?: google.bigtable.v2.Type.IFloat32): google.bigtable.v2.Type.Float32; /** - * 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 + * 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.RowFilter.IInterleave, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.Type.IFloat32, 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 + * 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.RowFilter.IInterleave, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.Type.IFloat32, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Interleave message from the specified reader or buffer. + * 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 Interleave + * @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.RowFilter.Interleave; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Float32; /** - * Decodes an Interleave message from the specified reader or buffer, length delimited. + * Decodes a Float32 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Interleave + * @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.RowFilter.Interleave; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Float32; /** - * Verifies an Interleave message. + * 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 an Interleave message from a plain object. Also converts values to their respective internal types. + * Creates a Float32 message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Interleave + * @returns Float32 */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowFilter.Interleave; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Float32; /** - * Creates a plain object from an Interleave message. Also converts values to other types if specified. - * @param message Interleave + * 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.RowFilter.Interleave, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.Type.Float32, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Interleave to JSON. + * Converts this Float32 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Interleave + * 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 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); + /** Properties of a Float64. */ + interface IFloat64 { } - /** Represents a Condition. */ - class Condition implements ICondition { + /** Represents a Float64. */ + class Float64 implements IFloat64 { /** - * Constructs a new Condition. + * Constructs a new Float64. * @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); + constructor(properties?: google.bigtable.v2.Type.IFloat64); /** - * Creates a new Condition instance using the specified properties. + * Creates a new Float64 instance using the specified properties. * @param [properties] Properties to set - * @returns Condition instance + * @returns Float64 instance */ - public static create(properties?: google.bigtable.v2.RowFilter.ICondition): google.bigtable.v2.RowFilter.Condition; + public static create(properties?: google.bigtable.v2.Type.IFloat64): google.bigtable.v2.Type.Float64; /** - * 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 + * 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.RowFilter.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.Type.IFloat64, 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 + * 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.RowFilter.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.Type.IFloat64, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Condition message from the specified reader or buffer. + * 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 Condition + * @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.RowFilter.Condition; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Float64; /** - * Decodes a Condition message from the specified reader or buffer, length delimited. + * Decodes a Float64 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Condition + * @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.RowFilter.Condition; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Float64; /** - * Verifies a Condition message. + * 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 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 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 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"|"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; + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * 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; + /** + * 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; - /** - * 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 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 }; - /** - * 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; + /** + * Converts this Float64 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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 }; + /** + * 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; + } - /** - * Converts this Mutation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a Timestamp. */ + interface ITimestamp { + } - /** - * 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; - } + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { - namespace Mutation { + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.ITimestamp); - /** Properties of a SetCell. */ - interface ISetCell { + /** + * 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; - /** SetCell familyName */ - familyName?: (string|null); + /** + * 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; - /** SetCell columnQualifier */ - columnQualifier?: (Uint8Array|string|null); + /** + * 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; - /** SetCell timestampMicros */ - timestampMicros?: (number|Long|string|null); + /** + * 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; - /** SetCell value */ - value?: (Uint8Array|string|null); - } + /** + * 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; - /** Represents a SetCell. */ - class SetCell implements ISetCell { + /** + * 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); /** - * Constructs a new SetCell. - * @param [properties] Properties to set + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp */ - constructor(properties?: google.bigtable.v2.Mutation.ISetCell); + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Timestamp; - /** SetCell familyName. */ - public familyName: string; + /** + * 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 }; - /** SetCell columnQualifier. */ - public columnQualifier: (Uint8Array|string); + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SetCell timestampMicros. */ - public timestampMicros: (number|Long|string); + /** + * 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; + } - /** SetCell value. */ - public value: (Uint8Array|string); + /** Properties of a Date. */ + interface IDate { + } + + /** Represents a Date. */ + class Date implements IDate { /** - * Creates a new SetCell instance using the specified properties. + * Constructs a new Date. * @param [properties] Properties to set - * @returns SetCell instance */ - public static create(properties?: google.bigtable.v2.Mutation.ISetCell): google.bigtable.v2.Mutation.SetCell; + constructor(properties?: google.bigtable.v2.Type.IDate); /** - * 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 + * 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.Mutation.ISetCell, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.Type.IDate, 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 + * 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.Mutation.ISetCell, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.Type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetCell message from the specified reader or buffer. + * 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 SetCell + * @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.Mutation.SetCell; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Date; /** - * Decodes a SetCell message from the specified reader or buffer, length delimited. + * Decodes a Date message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetCell + * @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.Mutation.SetCell; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Date; /** - * Verifies a SetCell message. + * 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 SetCell message from a plain object. Also converts values to their respective internal types. + * Creates a Date message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetCell + * @returns Date */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.SetCell; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Date; /** - * Creates a plain object from a SetCell message. Also converts values to other types if specified. - * @param message SetCell + * 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.Mutation.SetCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.Type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetCell to JSON. + * Converts this Date to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetCell + * 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 an AddToCell. */ - interface IAddToCell { - - /** AddToCell familyName */ - familyName?: (string|null); - - /** AddToCell columnQualifier */ - columnQualifier?: (google.bigtable.v2.IValue|null); + /** Properties of a Struct. */ + interface IStruct { - /** AddToCell timestamp */ - timestamp?: (google.bigtable.v2.IValue|null); - - /** AddToCell input */ - input?: (google.bigtable.v2.IValue|null); + /** Struct fields */ + fields?: (google.bigtable.v2.Type.Struct.IField[]|null); } - /** Represents an AddToCell. */ - class AddToCell implements IAddToCell { + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new AddToCell. + * Constructs a new Struct. * @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); + constructor(properties?: google.bigtable.v2.Type.IStruct); - /** AddToCell input. */ - public input?: (google.bigtable.v2.IValue|null); + /** Struct fields. */ + public fields: google.bigtable.v2.Type.Struct.IField[]; /** - * Creates a new AddToCell instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @param [properties] Properties to set - * @returns AddToCell instance + * @returns Struct instance */ - public static create(properties?: google.bigtable.v2.Mutation.IAddToCell): google.bigtable.v2.Mutation.AddToCell; + public static create(properties?: google.bigtable.v2.Type.IStruct): google.bigtable.v2.Type.Struct; /** - * 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 + * 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.Mutation.IAddToCell, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.Type.IStruct, 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 + * 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.Mutation.IAddToCell, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.Type.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AddToCell message from the specified reader or buffer. + * 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 AddToCell + * @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.Mutation.AddToCell; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Struct; /** - * Decodes an AddToCell message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AddToCell + * @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.Mutation.AddToCell; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Struct; /** - * Verifies an AddToCell message. + * 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 an AddToCell message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AddToCell + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.AddToCell; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Struct; /** - * Creates a plain object from an AddToCell message. Also converts values to other types if specified. - * @param message AddToCell + * 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.Mutation.AddToCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.Type.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AddToCell to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AddToCell + * Gets the default type url for Struct * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteFromColumn. */ - interface IDeleteFromColumn { + 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; - /** DeleteFromColumn familyName */ - familyName?: (string|null); + /** + * 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 }; - /** DeleteFromColumn columnQualifier */ - columnQualifier?: (Uint8Array|string|null); + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** DeleteFromColumn timeRange */ - timeRange?: (google.bigtable.v2.ITimestampRange|null); + /** + * 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; + } } - /** Represents a DeleteFromColumn. */ - class DeleteFromColumn implements IDeleteFromColumn { + /** Properties of an Array. */ + interface IArray { + + /** Array elementType */ + elementType?: (google.bigtable.v2.IType|null); + } + + /** Represents an Array. */ + class Array implements IArray { /** - * Constructs a new DeleteFromColumn. + * Constructs a new Array. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.Mutation.IDeleteFromColumn); - - /** DeleteFromColumn familyName. */ - public familyName: string; + constructor(properties?: google.bigtable.v2.Type.IArray); - /** DeleteFromColumn columnQualifier. */ - public columnQualifier: (Uint8Array|string); - - /** DeleteFromColumn timeRange. */ - public timeRange?: (google.bigtable.v2.ITimestampRange|null); + /** Array elementType. */ + public elementType?: (google.bigtable.v2.IType|null); /** - * Creates a new DeleteFromColumn instance using the specified properties. + * Creates a new Array instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFromColumn instance + * @returns Array instance */ - public static create(properties?: google.bigtable.v2.Mutation.IDeleteFromColumn): google.bigtable.v2.Mutation.DeleteFromColumn; + public static create(properties?: google.bigtable.v2.Type.IArray): google.bigtable.v2.Type.Array; /** - * 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 + * 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.Mutation.IDeleteFromColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.Type.IArray, 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 + * 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.Mutation.IDeleteFromColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.Type.IArray, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFromColumn message from the specified reader or buffer. + * 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 DeleteFromColumn + * @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.Mutation.DeleteFromColumn; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Array; /** - * Decodes a DeleteFromColumn message from the specified reader or buffer, length delimited. + * Decodes an Array message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFromColumn + * @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.Mutation.DeleteFromColumn; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Array; /** - * Verifies a DeleteFromColumn message. + * 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 a DeleteFromColumn message from a plain object. Also converts values to their respective internal types. + * Creates an Array message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFromColumn + * @returns Array */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.DeleteFromColumn; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Array; /** - * Creates a plain object from a DeleteFromColumn message. Also converts values to other types if specified. - * @param message DeleteFromColumn + * 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.Mutation.DeleteFromColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.Type.Array, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFromColumn to JSON. + * Converts this Array to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFromColumn + * 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 DeleteFromFamily. */ - interface IDeleteFromFamily { + /** Properties of a Map. */ + interface IMap { - /** DeleteFromFamily familyName */ - familyName?: (string|null); + /** Map keyType */ + keyType?: (google.bigtable.v2.IType|null); + + /** Map valueType */ + valueType?: (google.bigtable.v2.IType|null); } - /** Represents a DeleteFromFamily. */ - class DeleteFromFamily implements IDeleteFromFamily { + /** Represents a Map. */ + class Map implements IMap { /** - * Constructs a new DeleteFromFamily. + * Constructs a new Map. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.Mutation.IDeleteFromFamily); + constructor(properties?: google.bigtable.v2.Type.IMap); - /** DeleteFromFamily familyName. */ - public familyName: string; + /** Map keyType. */ + public keyType?: (google.bigtable.v2.IType|null); + + /** Map valueType. */ + public valueType?: (google.bigtable.v2.IType|null); /** - * Creates a new DeleteFromFamily instance using the specified properties. + * Creates a new Map instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFromFamily instance + * @returns Map instance */ - public static create(properties?: google.bigtable.v2.Mutation.IDeleteFromFamily): google.bigtable.v2.Mutation.DeleteFromFamily; + public static create(properties?: google.bigtable.v2.Type.IMap): google.bigtable.v2.Type.Map; /** - * 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 + * 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.Mutation.IDeleteFromFamily, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.Type.IMap, 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 + * 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.Mutation.IDeleteFromFamily, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.Type.IMap, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFromFamily message from the specified reader or buffer. + * 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 DeleteFromFamily + * @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.Mutation.DeleteFromFamily; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Map; /** - * Decodes a DeleteFromFamily message from the specified reader or buffer, length delimited. + * Decodes a Map message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFromFamily + * @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.Mutation.DeleteFromFamily; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Map; /** - * Verifies a DeleteFromFamily message. + * 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 DeleteFromFamily message from a plain object. Also converts values to their respective internal types. + * Creates a Map message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFromFamily + * @returns Map */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.DeleteFromFamily; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Map; /** - * Creates a plain object from a DeleteFromFamily message. Also converts values to other types if specified. - * @param message DeleteFromFamily + * 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.Mutation.DeleteFromFamily, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.Type.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFromFamily to JSON. + * Converts this Map to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFromFamily + * 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 a DeleteFromRow. */ - interface IDeleteFromRow { + /** 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 a DeleteFromRow. */ - class DeleteFromRow implements IDeleteFromRow { + /** Represents an Aggregate. */ + class Aggregate implements IAggregate { /** - * Constructs a new DeleteFromRow. + * Constructs a new Aggregate. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.v2.Mutation.IDeleteFromRow); + 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 DeleteFromRow instance using the specified properties. + * Creates a new Aggregate instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFromRow instance + * @returns Aggregate instance */ - public static create(properties?: google.bigtable.v2.Mutation.IDeleteFromRow): google.bigtable.v2.Mutation.DeleteFromRow; + public static create(properties?: google.bigtable.v2.Type.IAggregate): google.bigtable.v2.Type.Aggregate; /** - * 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 + * 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.Mutation.IDeleteFromRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.v2.Type.IAggregate, 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 + * 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.Mutation.IDeleteFromRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.v2.Type.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFromRow message from the specified reader or buffer. + * 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 DeleteFromRow + * @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.Mutation.DeleteFromRow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Aggregate; /** - * Decodes a DeleteFromRow message from the specified reader or buffer, length delimited. + * Decodes an Aggregate message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFromRow + * @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.Mutation.DeleteFromRow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Aggregate; /** - * Verifies a DeleteFromRow message. + * 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 a DeleteFromRow message from a plain object. Also converts values to their respective internal types. + * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFromRow + * @returns Aggregate */ - public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.DeleteFromRow; + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Aggregate; /** - * Creates a plain object from a DeleteFromRow message. Also converts values to other types if specified. - * @param message DeleteFromRow + * 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.Mutation.DeleteFromRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.v2.Type.Aggregate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFromRow to JSON. + * Converts this Aggregate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFromRow + * 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; } - } - - /** Properties of a ReadModifyWriteRule. */ - interface IReadModifyWriteRule { - - /** ReadModifyWriteRule familyName */ - familyName?: (string|null); - - /** ReadModifyWriteRule columnQualifier */ - columnQualifier?: (Uint8Array|string|null); - - /** ReadModifyWriteRule appendValue */ - appendValue?: (Uint8Array|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|string); - - /** ReadModifyWriteRule appendValue. */ - public appendValue?: (Uint8Array|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; + namespace Aggregate { - /** - * 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); + /** Properties of a Sum. */ + interface ISum { + } - /** - * 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; + /** Represents a Sum. */ + class Sum implements ISum { - /** - * 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 }; + /** + * Constructs a new Sum. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Aggregate.ISum); - /** - * Converts this ReadModifyWriteRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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; - /** Properties of a StreamPartition. */ - interface IStreamPartition { + /** + * 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; - /** StreamPartition rowRange */ - rowRange?: (google.bigtable.v2.IRowRange|null); - } + /** + * 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; - /** Represents a StreamPartition. */ - class StreamPartition implements IStreamPartition { + /** + * 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; - /** - * Constructs a new StreamPartition. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IStreamPartition); + /** + * 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); - /** StreamPartition rowRange. */ - public rowRange?: (google.bigtable.v2.IRowRange|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 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; + /** + * 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 }; - /** - * 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; + /** + * Converts this Sum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * 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; + } - /** - * 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; + /** Properties of a Max. */ + interface IMax { + } - /** - * 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; + /** Represents a Max. */ + class Max implements IMax { - /** - * 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); + /** + * Constructs a new Max. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Aggregate.IMax); - /** - * 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 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; - /** - * 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 }; + /** + * 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; - /** - * Converts this StreamPartition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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; - /** Properties of a StreamContinuationTokens. */ - interface IStreamContinuationTokens { + /** + * 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; - /** StreamContinuationTokens tokens */ - tokens?: (google.bigtable.v2.IStreamContinuationToken[]|null); - } + /** + * 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); - /** Represents a StreamContinuationTokens. */ - class StreamContinuationTokens implements IStreamContinuationTokens { + /** + * 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; - /** - * Constructs a new StreamContinuationTokens. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IStreamContinuationTokens); + /** + * 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 }; - /** StreamContinuationTokens tokens. */ - public tokens: google.bigtable.v2.IStreamContinuationToken[]; + /** + * Converts this Max to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * 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; + } - /** - * 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; + /** Properties of a Min. */ + interface IMin { + } - /** - * 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; + /** Represents a Min. */ + class Min implements IMin { - /** - * 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; + /** + * Constructs a new Min. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Aggregate.IMin); - /** - * 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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 }; + /** + * 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; - /** - * Converts this StreamContinuationTokens to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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); - /** Properties of a StreamContinuationToken. */ - interface IStreamContinuationToken { + /** + * 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; - /** StreamContinuationToken partition */ - partition?: (google.bigtable.v2.IStreamPartition|null); + /** + * 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 }; - /** StreamContinuationToken token */ - token?: (string|null); - } + /** + * Converts this Min to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a StreamContinuationToken. */ - class StreamContinuationToken implements IStreamContinuationToken { + /** + * 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; + } - /** - * Constructs a new StreamContinuationToken. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.v2.IStreamContinuationToken); + /** Properties of a HyperLogLogPlusPlusUniqueCount. */ + interface IHyperLogLogPlusPlusUniqueCount { + } - /** StreamContinuationToken partition. */ - public partition?: (google.bigtable.v2.IStreamPartition|null); + /** Represents a HyperLogLogPlusPlusUniqueCount. */ + class HyperLogLogPlusPlusUniqueCount implements IHyperLogLogPlusPlusUniqueCount { - /** StreamContinuationToken token. */ - public token: string; + /** + * Constructs a new HyperLogLogPlusPlusUniqueCount. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount); - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 StreamContinuationToken to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this HyperLogLogPlusPlusUniqueCount 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; + /** + * 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. */ @@ -20265,12 +25298,6 @@ export namespace google { /** ResponseParams clusterId. */ public clusterId?: (string|null); - /** ResponseParams _zoneId. */ - public _zoneId?: "zoneId"; - - /** ResponseParams _clusterId. */ - public _clusterId?: "clusterId"; - /** * Creates a new ResponseParams instance using the specified properties. * @param [properties] Properties to set @@ -29673,6 +34700,115 @@ export namespace google { */ 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. */ diff --git a/protos/protos.js b/protos/protos.js index 2cd5a56a6..0dfb247b3 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -7734,12 +7734,7 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - /** - * Instance _satisfiesPzs. - * @member {"satisfiesPzs"|undefined} _satisfiesPzs - * @memberof google.bigtable.admin.v2.Instance - * @instance - */ + // Virtual OneOf for proto3 optional field Object.defineProperty(Instance.prototype, "_satisfiesPzs", { get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), set: $util.oneOfSetter($oneOfFields) @@ -10876,12 +10871,7 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - /** - * DataBoostIsolationReadOnly _computeBillingOwner. - * @member {"computeBillingOwner"|undefined} _computeBillingOwner - * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly - * @instance - */ + // Virtual OneOf for proto3 optional field Object.defineProperty(DataBoostIsolationReadOnly.prototype, "_computeBillingOwner", { get: $util.oneOfGetter($oneOfFields = ["computeBillingOwner"]), set: $util.oneOfSetter($oneOfFields) @@ -28751,6 +28741,8 @@ * @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 */ /** @@ -28840,6 +28832,22 @@ */ 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 @@ -28882,6 +28890,10 @@ $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).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()).ldelim(); return writer; }; @@ -28952,6 +28964,14 @@ message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32()); break; } + case 11: { + message.backupType = reader.int32(); + break; + } + case 12: { + message.hotToStandardTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29028,6 +29048,20 @@ if (error) return "encryptionInfo." + error; } + if (message.backupType != null && message.hasOwnProperty("backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.hotToStandardTime != null && message.hasOwnProperty("hotToStandardTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.hotToStandardTime); + if (error) + return "hotToStandardTime." + error; + } return null; }; @@ -29098,6 +29132,31 @@ throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo); } + 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 (typeof object.hotToStandardTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.hotToStandardTime: object expected"); + message.hotToStandardTime = $root.google.protobuf.Timestamp.fromObject(object.hotToStandardTime); + } return message; }; @@ -29128,6 +29187,8 @@ 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 && message.hasOwnProperty("name")) object.name = message.name; @@ -29150,6 +29211,10 @@ object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options); if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) object.sourceBackup = message.sourceBackup; + if (message.backupType != null && message.hasOwnProperty("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 && message.hasOwnProperty("hotToStandardTime")) + object.hotToStandardTime = $root.google.protobuf.Timestamp.toObject(message.hotToStandardTime, options); return object; }; @@ -29195,6 +29260,22 @@ 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; })(); @@ -29527,7 +29608,15 @@ * @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 */ /** @@ -29569,6 +29658,46 @@ */ 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 @@ -29577,17 +29706,41 @@ */ 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; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Type kind. - * @member {"bytesType"|"stringType"|"int64Type"|"aggregateType"|undefined} kind + * @member {"bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"|undefined} kind * @memberof google.bigtable.admin.v2.Type * @instance */ Object.defineProperty(Type.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["bytesType", "stringType", "int64Type", "aggregateType"]), + get: $util.oneOfGetter($oneOfFields = ["bytesType", "stringType", "int64Type", "float32Type", "float64Type", "boolType", "timestampType", "dateType", "aggregateType", "structType", "arrayType", "mapType"]), set: $util.oneOfSetter($oneOfFields) }); @@ -29619,10 +29772,26 @@ $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).ldelim(); return writer; }; @@ -29669,10 +29838,42 @@ message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.decode(reader, reader.uint32()); break; } + case 12: { + message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.decode(reader, reader.uint32()); + break; + } + case 9: { + message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.decode(reader, reader.uint32()); + break; + } + case 8: { + message.boolType = $root.google.bigtable.admin.v2.Type.Bool.decode(reader, reader.uint32()); + break; + } + case 10: { + message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.dateType = $root.google.bigtable.admin.v2.Type.Date.decode(reader, reader.uint32()); + break; + } case 6: { message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.decode(reader, reader.uint32()); break; } + case 7: { + message.structType = $root.google.bigtable.admin.v2.Type.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.arrayType = $root.google.bigtable.admin.v2.Type.Array.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mapType = $root.google.bigtable.admin.v2.Type.Map.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29737,6 +29938,56 @@ return "int64Type." + error; } } + if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Float32.verify(message.float32Type); + if (error) + return "float32Type." + error; + } + } + if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Float64.verify(message.float64Type); + if (error) + return "float64Type." + error; + } + } + if (message.boolType != null && message.hasOwnProperty("boolType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bool.verify(message.boolType); + if (error) + return "boolType." + error; + } + } + if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Timestamp.verify(message.timestampType); + if (error) + return "timestampType." + error; + } + } + if (message.dateType != null && message.hasOwnProperty("dateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Date.verify(message.dateType); + if (error) + return "dateType." + error; + } + } if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { if (properties.kind === 1) return "kind: multiple values"; @@ -29747,6 +29998,36 @@ return "aggregateType." + error; } } + if (message.structType != null && message.hasOwnProperty("structType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Struct.verify(message.structType); + if (error) + return "structType." + error; + } + } + if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Array.verify(message.arrayType); + if (error) + return "arrayType." + error; + } + } + if (message.mapType != null && message.hasOwnProperty("mapType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Map.verify(message.mapType); + if (error) + return "mapType." + error; + } + } return null; }; @@ -29777,11 +30058,51 @@ throw TypeError(".google.bigtable.admin.v2.Type.int64Type: object expected"); message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.fromObject(object.int64Type); } + if (object.float32Type != null) { + if (typeof object.float32Type !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.float32Type: object expected"); + message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.fromObject(object.float32Type); + } + if (object.float64Type != null) { + if (typeof object.float64Type !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.float64Type: object expected"); + message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.fromObject(object.float64Type); + } + if (object.boolType != null) { + if (typeof object.boolType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.boolType: object expected"); + message.boolType = $root.google.bigtable.admin.v2.Type.Bool.fromObject(object.boolType); + } + if (object.timestampType != null) { + if (typeof object.timestampType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.timestampType: object expected"); + message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.fromObject(object.timestampType); + } + if (object.dateType != null) { + if (typeof object.dateType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.dateType: object expected"); + message.dateType = $root.google.bigtable.admin.v2.Type.Date.fromObject(object.dateType); + } if (object.aggregateType != null) { if (typeof object.aggregateType !== "object") throw TypeError(".google.bigtable.admin.v2.Type.aggregateType: object expected"); message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.fromObject(object.aggregateType); } + if (object.structType != null) { + if (typeof object.structType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.structType: object expected"); + message.structType = $root.google.bigtable.admin.v2.Type.Struct.fromObject(object.structType); + } + if (object.arrayType != null) { + if (typeof object.arrayType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.arrayType: object expected"); + message.arrayType = $root.google.bigtable.admin.v2.Type.Array.fromObject(object.arrayType); + } + if (object.mapType != null) { + if (typeof object.mapType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.mapType: object expected"); + message.mapType = $root.google.bigtable.admin.v2.Type.Map.fromObject(object.mapType); + } return message; }; @@ -29808,6 +30129,16 @@ if (options.oneofs) object.kind = "stringType"; } + if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + object.arrayType = $root.google.bigtable.admin.v2.Type.Array.toObject(message.arrayType, options); + if (options.oneofs) + object.kind = "arrayType"; + } + if (message.mapType != null && message.hasOwnProperty("mapType")) { + object.mapType = $root.google.bigtable.admin.v2.Type.Map.toObject(message.mapType, options); + if (options.oneofs) + object.kind = "mapType"; + } if (message.int64Type != null && message.hasOwnProperty("int64Type")) { object.int64Type = $root.google.bigtable.admin.v2.Type.Int64.toObject(message.int64Type, options); if (options.oneofs) @@ -29818,6 +30149,36 @@ if (options.oneofs) object.kind = "aggregateType"; } + if (message.structType != null && message.hasOwnProperty("structType")) { + object.structType = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.structType, options); + if (options.oneofs) + object.kind = "structType"; + } + if (message.boolType != null && message.hasOwnProperty("boolType")) { + object.boolType = $root.google.bigtable.admin.v2.Type.Bool.toObject(message.boolType, options); + if (options.oneofs) + object.kind = "boolType"; + } + if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + object.float64Type = $root.google.bigtable.admin.v2.Type.Float64.toObject(message.float64Type, options); + if (options.oneofs) + object.kind = "float64Type"; + } + if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + object.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.toObject(message.timestampType, options); + if (options.oneofs) + object.kind = "timestampType"; + } + if (message.dateType != null && message.hasOwnProperty("dateType")) { + object.dateType = $root.google.bigtable.admin.v2.Type.Date.toObject(message.dateType, options); + if (options.oneofs) + object.kind = "dateType"; + } + if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + object.float32Type = $root.google.bigtable.admin.v2.Type.Float32.toObject(message.float32Type, options); + if (options.oneofs) + object.kind = "float32Type"; + } return object; }; @@ -30669,6 +31030,7 @@ * @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 */ /** @@ -30694,17 +31056,25 @@ */ 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"|undefined} 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"]), + get: $util.oneOfGetter($oneOfFields = ["utf8Raw", "utf8Bytes"]), set: $util.oneOfSetter($oneOfFields) }); @@ -30734,6 +31104,8 @@ writer = $Writer.create(); 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()).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()).ldelim(); return writer; }; @@ -30772,6 +31144,10 @@ message.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.decode(reader, reader.uint32()); break; } + case 2: { + message.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -30816,6 +31192,16 @@ return "utf8Raw." + error; } } + if (message.utf8Bytes != null && message.hasOwnProperty("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); + if (error) + return "utf8Bytes." + error; + } + } return null; }; @@ -30836,6 +31222,11 @@ 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); } + if (object.utf8Bytes != null) { + if (typeof object.utf8Bytes !== "object") + 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); + } return message; }; @@ -30857,6 +31248,11 @@ if (options.oneofs) object.encoding = "utf8Raw"; } + if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { + object.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options); + if (options.oneofs) + object.encoding = "utf8Bytes"; + } return object; }; @@ -31061,6 +31457,181 @@ 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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; })(); @@ -31710,26 +32281,23 @@ return Int64; })(); - Type.Aggregate = (function() { + Type.Bool = (function() { /** - * Properties of an Aggregate. + * Properties of a Bool. * @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 + * @interface IBool */ /** - * Constructs a new Aggregate. + * Constructs a new Bool. * @memberof google.bigtable.admin.v2.Type - * @classdesc Represents an Aggregate. - * @implements IAggregate + * @classdesc Represents a Bool. + * @implements IBool * @constructor - * @param {google.bigtable.admin.v2.Type.IAggregate=} [properties] Properties to set + * @param {google.bigtable.admin.v2.Type.IBool=} [properties] Properties to set */ - function Aggregate(properties) { + function Bool(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31737,119 +32305,238 @@ } /** - * Aggregate inputType. - * @member {google.bigtable.admin.v2.IType|null|undefined} inputType - * @memberof google.bigtable.admin.v2.Type.Aggregate - * @instance + * 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 */ - Aggregate.prototype.inputType = null; + Bool.create = function create(properties) { + return new Bool(properties); + }; /** - * Aggregate stateType. - * @member {google.bigtable.admin.v2.IType|null|undefined} stateType - * @memberof google.bigtable.admin.v2.Type.Aggregate - * @instance + * 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 */ - Aggregate.prototype.stateType = null; + Bool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Aggregate sum. - * @member {google.bigtable.admin.v2.Type.Aggregate.ISum|null|undefined} sum - * @memberof google.bigtable.admin.v2.Type.Aggregate - * @instance + * 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 */ - Aggregate.prototype.sum = null; + Bool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Aggregate aggregator. - * @member {"sum"|undefined} aggregator - * @memberof google.bigtable.admin.v2.Type.Aggregate + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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 */ - Object.defineProperty(Aggregate.prototype, "aggregator", { - get: $util.oneOfGetter($oneOfFields = ["sum"]), - set: $util.oneOfSetter($oneOfFields) - }); + Bool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates a new Aggregate instance using the specified properties. + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Float32 instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.Type.Aggregate + * @memberof google.bigtable.admin.v2.Type.Float32 * @static - * @param {google.bigtable.admin.v2.Type.IAggregate=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate instance + * @param {google.bigtable.admin.v2.Type.IFloat32=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Float32} Float32 instance */ - Aggregate.create = function create(properties) { - return new Aggregate(properties); + Float32.create = function create(properties) { + return new Float32(properties); }; /** - * Encodes the specified Aggregate message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * 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.Aggregate + * @memberof google.bigtable.admin.v2.Type.Float32 * @static - * @param {google.bigtable.admin.v2.Type.IAggregate} message Aggregate message or plain object to encode + * @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 */ - Aggregate.encode = function encode(message, writer) { + Float32.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).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()).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()).ldelim(); return writer; }; /** - * Encodes the specified Aggregate message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * 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.Aggregate + * @memberof google.bigtable.admin.v2.Type.Float32 * @static - * @param {google.bigtable.admin.v2.Type.IAggregate} message Aggregate message or plain object to encode + * @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 */ - Aggregate.encodeDelimited = function encodeDelimited(message, writer) { + Float32.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Aggregate message from the specified reader or buffer. + * Decodes a Float32 message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.Type.Aggregate + * @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.Aggregate} Aggregate + * @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 */ - Aggregate.decode = function decode(reader, length) { + Float32.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Aggregate(); + 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(); switch (tag >>> 3) { - case 1: { - message.inputType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stateType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -31859,2489 +32546,3156 @@ }; /** - * Decodes an Aggregate message from the specified reader or buffer, length delimited. + * Decodes a Float32 message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.Type.Aggregate + * @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.Aggregate} Aggregate + * @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 */ - Aggregate.decodeDelimited = function decodeDelimited(reader) { + Float32.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Aggregate message. + * Verifies a Float32 message. * @function verify - * @memberof google.bigtable.admin.v2.Type.Aggregate + * @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 */ - Aggregate.verify = function verify(message) { + Float32.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.inputType != null && message.hasOwnProperty("inputType")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.inputType); - if (error) - return "inputType." + error; - } - if (message.stateType != null && message.hasOwnProperty("stateType")) { - var error = $root.google.bigtable.admin.v2.Type.verify(message.stateType); - if (error) - return "stateType." + error; - } - if (message.sum != null && message.hasOwnProperty("sum")) { - properties.aggregator = 1; - { - var error = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.verify(message.sum); - if (error) - return "sum." + error; - } - } return null; }; /** - * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. + * Creates a Float32 message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.Type.Aggregate + * @memberof google.bigtable.admin.v2.Type.Float32 * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate + * @returns {google.bigtable.admin.v2.Type.Float32} Float32 */ - Aggregate.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate) + Float32.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Float32) return object; - var message = new $root.google.bigtable.admin.v2.Type.Aggregate(); - if (object.inputType != null) { - if (typeof object.inputType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.inputType: object expected"); - message.inputType = $root.google.bigtable.admin.v2.Type.fromObject(object.inputType); - } - if (object.stateType != null) { - if (typeof object.stateType !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.stateType: object expected"); - message.stateType = $root.google.bigtable.admin.v2.Type.fromObject(object.stateType); - } - if (object.sum != null) { - if (typeof object.sum !== "object") - throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.sum: object expected"); - message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.fromObject(object.sum); - } - return message; + return new $root.google.bigtable.admin.v2.Type.Float32(); }; /** - * Creates a plain object from an Aggregate message. Also converts values to other types if specified. + * Creates a plain object from a Float32 message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.Type.Aggregate + * @memberof google.bigtable.admin.v2.Type.Float32 * @static - * @param {google.bigtable.admin.v2.Type.Aggregate} message Aggregate + * @param {google.bigtable.admin.v2.Type.Float32} message Float32 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Aggregate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.inputType = null; - object.stateType = null; - } - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = $root.google.bigtable.admin.v2.Type.toObject(message.inputType, options); - if (message.stateType != null && message.hasOwnProperty("stateType")) - object.stateType = $root.google.bigtable.admin.v2.Type.toObject(message.stateType, options); - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.toObject(message.sum, options); - if (options.oneofs) - object.aggregator = "sum"; - } - return object; + Float32.toObject = function toObject() { + return {}; }; /** - * Converts this Aggregate to JSON. + * Converts this Float32 to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.Type.Aggregate + * @memberof google.bigtable.admin.v2.Type.Float32 * @instance * @returns {Object.} JSON object */ - Aggregate.prototype.toJSON = function toJSON() { + Float32.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Aggregate + * Gets the default type url for Float32 * @function getTypeUrl - * @memberof google.bigtable.admin.v2.Type.Aggregate + * @memberof google.bigtable.admin.v2.Type.Float32 * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Aggregate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Float32.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Aggregate"; + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Float32"; }; - Aggregate.Sum = (function() { + return Float32; + })(); - /** - * Properties of a Sum. - * @memberof google.bigtable.admin.v2.Type.Aggregate - * @interface ISum - */ + Type.Float64 = (function() { - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Float64. + * @memberof google.bigtable.admin.v2.Type + * @interface IFloat64 + */ - /** - * 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); - }; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * 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 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).ldelim(); - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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).ldelim(); + }; - /** - * 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()); - }; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * 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()); + }; - /** - * 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) { - if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Sum) - return object; - return new $root.google.bigtable.admin.v2.Type.Aggregate.Sum(); - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * 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 {}; - }; + /** + * 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Float64) + return object; + return new $root.google.bigtable.admin.v2.Type.Float64(); + }; - /** - * 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); - }; + /** + * 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 {}; + }; - /** - * 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"; - }; + /** + * 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); + }; - return Sum; - })(); + /** + * 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 Aggregate; + return Float64; })(); - return Type; - })(); + Type.Timestamp = (function() { - return v2; - })(); + /** + * Properties of a Timestamp. + * @memberof google.bigtable.admin.v2.Type + * @interface ITimestamp + */ - return admin; - })(); + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - bigtable.v2 = (function() { + /** + * 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); + }; - /** - * Namespace v2. - * @memberof google.bigtable - * @namespace - */ - var v2 = {}; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - v2.Bigtable = (function() { + /** + * 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).ldelim(); + }; - /** - * 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); - } + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - (Bigtable.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Bigtable; + /** + * 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()); + }; - /** - * 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); - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * 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 - */ + /** + * 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Timestamp) + return object; + return new $root.google.bigtable.admin.v2.Type.Timestamp(); + }; - /** - * 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 this.rpcCall(readRows, $root.google.bigtable.v2.ReadRowsRequest, $root.google.bigtable.v2.ReadRowsResponse, request, callback); - }, "name", { value: "ReadRows" }); + /** + * 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() { + return {}; + }; - /** - * 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 - */ + /** + * 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); + }; - /** - * 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 - */ + /** + * 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"; + }; - /** - * 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 this.rpcCall(sampleRowKeys, $root.google.bigtable.v2.SampleRowKeysRequest, $root.google.bigtable.v2.SampleRowKeysResponse, request, callback); - }, "name", { value: "SampleRowKeys" }); + return Timestamp; + })(); - /** - * 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 - */ + Type.Date = (function() { - /** - * 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 - */ + /** + * Properties of a Date. + * @memberof google.bigtable.admin.v2.Type + * @interface IDate + */ - /** - * 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 this.rpcCall(mutateRow, $root.google.bigtable.v2.MutateRowRequest, $root.google.bigtable.v2.MutateRowResponse, request, callback); - }, "name", { value: "MutateRow" }); + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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 - */ + /** + * 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); + }; - /** - * 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 - */ + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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 this.rpcCall(mutateRows, $root.google.bigtable.v2.MutateRowsRequest, $root.google.bigtable.v2.MutateRowsResponse, request, callback); - }, "name", { value: "MutateRows" }); + /** + * 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).ldelim(); + }; - /** - * 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 - */ + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 - */ + /** + * 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()); + }; - /** - * 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 this.rpcCall(checkAndMutateRow, $root.google.bigtable.v2.CheckAndMutateRowRequest, $root.google.bigtable.v2.CheckAndMutateRowResponse, request, callback); - }, "name", { value: "CheckAndMutateRow" }); + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * 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 - */ + /** + * 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Date) + return object; + return new $root.google.bigtable.admin.v2.Type.Date(); + }; - /** - * 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 - */ + /** + * 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 {}; + }; - /** - * 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 this.rpcCall(pingAndWarm, $root.google.bigtable.v2.PingAndWarmRequest, $root.google.bigtable.v2.PingAndWarmResponse, request, callback); - }, "name", { value: "PingAndWarm" }); + /** + * 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); + }; - /** - * 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 - */ + /** + * 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"; + }; - /** - * 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 - */ + return Date; + })(); - /** - * 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 this.rpcCall(readModifyWriteRow, $root.google.bigtable.v2.ReadModifyWriteRowRequest, $root.google.bigtable.v2.ReadModifyWriteRowResponse, request, callback); - }, "name", { value: "ReadModifyWriteRow" }); + Type.Struct = (function() { - /** - * 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 - */ + /** + * Properties of a Struct. + * @memberof google.bigtable.admin.v2.Type + * @interface IStruct + * @property {Array.|null} [fields] Struct fields + */ - /** - * 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 - */ + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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 this.rpcCall(generateInitialChangeStreamPartitions, $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, request, callback); - }, "name", { value: "GenerateInitialChangeStreamPartitions" }); + /** + * Struct fields. + * @member {Array.} fields + * @memberof google.bigtable.admin.v2.Type.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyArray; - /** - * 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 - */ + /** + * 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); + }; - /** - * 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 - */ + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + return writer; + }; - /** - * 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 this.rpcCall(readChangeStream, $root.google.bigtable.v2.ReadChangeStreamRequest, $root.google.bigtable.v2.ReadChangeStreamResponse, request, callback); - }, "name", { value: "ReadChangeStream" }); + /** + * 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).ldelim(); + }; - /** - * 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 - */ + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return Bigtable; - })(); + /** + * 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()); + }; - v2.ReadRowsRequest = (function() { + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.bigtable.admin.v2.Type.Struct.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + return null; + }; - /** - * 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} [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 - */ + /** + * 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct) + return object; + 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 (typeof object.fields[i] !== "object") + 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]); + } + } + return message; + }; - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + 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); + } + return object; + }; - /** - * ReadRowsRequest tableName. - * @member {string} tableName - * @memberof google.bigtable.v2.ReadRowsRequest - * @instance - */ - ReadRowsRequest.prototype.tableName = ""; + /** + * 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); + }; - /** - * ReadRowsRequest authorizedViewName. - * @member {string} authorizedViewName - * @memberof google.bigtable.v2.ReadRowsRequest - * @instance - */ - ReadRowsRequest.prototype.authorizedViewName = ""; + /** + * 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"; + }; - /** - * ReadRowsRequest appProfileId. - * @member {string} appProfileId - * @memberof google.bigtable.v2.ReadRowsRequest - * @instance - */ - ReadRowsRequest.prototype.appProfileId = ""; + Struct.Field = (function() { - /** - * ReadRowsRequest rows. - * @member {google.bigtable.v2.IRowSet|null|undefined} rows - * @memberof google.bigtable.v2.ReadRowsRequest - * @instance - */ - ReadRowsRequest.prototype.rows = null; + /** + * 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 + */ - /** - * ReadRowsRequest filter. - * @member {google.bigtable.v2.IRowFilter|null|undefined} filter - * @memberof google.bigtable.v2.ReadRowsRequest - * @instance - */ - ReadRowsRequest.prototype.filter = null; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * ReadRowsRequest rowsLimit. - * @member {number|Long} rowsLimit - * @memberof google.bigtable.v2.ReadRowsRequest - * @instance - */ - ReadRowsRequest.prototype.rowsLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Field fieldName. + * @member {string} fieldName + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @instance + */ + Field.prototype.fieldName = ""; - /** - * ReadRowsRequest requestStatsView. - * @member {google.bigtable.v2.ReadRowsRequest.RequestStatsView} requestStatsView - * @memberof google.bigtable.v2.ReadRowsRequest - * @instance - */ - ReadRowsRequest.prototype.requestStatsView = 0; + /** + * Field type. + * @member {google.bigtable.admin.v2.IType|null|undefined} type + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @instance + */ + Field.prototype.type = null; - /** - * ReadRowsRequest reversed. - * @member {boolean} reversed - * @memberof google.bigtable.v2.ReadRowsRequest - * @instance - */ - ReadRowsRequest.prototype.reversed = false; + /** + * 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); + }; - /** - * 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 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) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.admin.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) - $root.google.bigtable.v2.RowSet.encode(message.rows, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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); - 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).ldelim(); + }; - /** - * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableName = reader.string(); - break; - } - case 9: { - message.authorizedViewName = reader.string(); - break; - } - case 5: { - message.appProfileId = reader.string(); - break; - } - case 2: { - message.rows = $root.google.bigtable.v2.RowSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.filter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - 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); - 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()); + }; - /** - * 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 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.type); + if (error) + return "type." + error; + } + return null; + }; - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - var error = $root.google.bigtable.v2.RowSet.verify(message.rows); - if (error) - return "rows." + error; - } - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.rowsLimit != null && message.hasOwnProperty("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 && message.hasOwnProperty("requestStatsView")) - switch (message.requestStatsView) { - default: - return "requestStatsView: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.reversed != null && message.hasOwnProperty("reversed")) - if (typeof message.reversed !== "boolean") - return "reversed: boolean expected"; - 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Field) + return object; + 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 (typeof object.type !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Field.type: object expected"); + message.type = $root.google.bigtable.admin.v2.Type.fromObject(object.type); + } + return message; + }; - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.ReadRowsRequest) - return object; - 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.appProfileId != null) - message.appProfileId = String(object.appProfileId); - if (object.rows != null) { - if (typeof object.rows !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsRequest.rows: object expected"); - message.rows = $root.google.bigtable.v2.RowSet.fromObject(object.rows); - } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsRequest.filter: object expected"); - message.filter = $root.google.bigtable.v2.RowFilter.fromObject(object.filter); - } - if (object.rowsLimit != null) - if ($util.Long) - (message.rowsLimit = $util.Long.fromValue(object.rowsLimit)).unsigned = 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) { - if (!options) - options = {}; - 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() : long; - } else - object.rowsLimit = options.longs === String ? "0" : 0; - object.appProfileId = ""; - object.requestStatsView = options.enums === String ? "REQUEST_STATS_VIEW_UNSPECIFIED" : 0; - object.reversed = false; - object.authorizedViewName = ""; - } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.rows != null && message.hasOwnProperty("rows")) - object.rows = $root.google.bigtable.v2.RowSet.toObject(message.rows, options); - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.bigtable.v2.RowFilter.toObject(message.filter, options); - if (message.rowsLimit != null && message.hasOwnProperty("rowsLimit")) - 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 && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.requestStatsView != null && message.hasOwnProperty("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 && message.hasOwnProperty("reversed")) - object.reversed = message.reversed; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - object.authorizedViewName = message.authorizedViewName; - return object; - }; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.type = null; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = $root.google.bigtable.admin.v2.Type.toObject(message.type, options); + 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); - }; + /** + * 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 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"; - }; + /** + * 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"; + }; - /** - * 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 Field; + })(); - return ReadRowsRequest; - })(); + return Struct; + })(); - v2.ReadRowsResponse = (function() { + Type.Array = (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 - */ + /** + * 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 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * ReadRowsResponse chunks. - * @member {Array.} chunks - * @memberof google.bigtable.v2.ReadRowsResponse - * @instance - */ - ReadRowsResponse.prototype.chunks = $util.emptyArray; + /** + * Array elementType. + * @member {google.bigtable.admin.v2.IType|null|undefined} elementType + * @memberof google.bigtable.admin.v2.Type.Array + * @instance + */ + Array.prototype.elementType = null; - /** - * ReadRowsResponse lastScannedRowKey. - * @member {Uint8Array} lastScannedRowKey - * @memberof google.bigtable.v2.ReadRowsResponse - * @instance - */ - ReadRowsResponse.prototype.lastScannedRowKey = $util.newBuffer([]); + /** + * 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); + }; - /** - * ReadRowsResponse requestStats. - * @member {google.bigtable.v2.IRequestStats|null|undefined} requestStats - * @memberof google.bigtable.v2.ReadRowsResponse - * @instance - */ - ReadRowsResponse.prototype.requestStats = null; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + return writer; + }; - /** - * 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 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).ldelim(); + }; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).ldelim(); - return writer; - }; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.elementType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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).ldelim(); - }; + /** + * 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()); + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.elementType != null && message.hasOwnProperty("elementType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.elementType); + if (error) + return "elementType." + error; } - case 2: { - message.lastScannedRowKey = reader.bytes(); - break; + 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Array) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Array(); + if (object.elementType != null) { + if (typeof object.elementType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Array.elementType: object expected"); + message.elementType = $root.google.bigtable.admin.v2.Type.fromObject(object.elementType); } - case 3: { - message.requestStats = $root.google.bigtable.v2.RequestStats.decode(reader, reader.uint32()); - break; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.elementType = null; + if (message.elementType != null && message.hasOwnProperty("elementType")) + object.elementType = $root.google.bigtable.admin.v2.Type.toObject(message.elementType, options); + 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"; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Array"; + }; - /** - * 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()); - }; + return Array; + })(); - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chunks != null && message.hasOwnProperty("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]); - if (error) - return "chunks." + error; - } - } - if (message.lastScannedRowKey != null && message.hasOwnProperty("lastScannedRowKey")) - if (!(message.lastScannedRowKey && typeof message.lastScannedRowKey.length === "number" || $util.isString(message.lastScannedRowKey))) - return "lastScannedRowKey: buffer expected"; - if (message.requestStats != null && message.hasOwnProperty("requestStats")) { - var error = $root.google.bigtable.v2.RequestStats.verify(message.requestStats); - if (error) - return "requestStats." + error; - } - return null; - }; + Type.Map = (function() { - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.ReadRowsResponse) - return object; - 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 (typeof object.chunks[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsResponse.chunks: object expected"); - message.chunks[i] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.fromObject(object.chunks[i]); - } - } - 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 (typeof object.requestStats !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsResponse.requestStats: object expected"); - message.requestStats = $root.google.bigtable.v2.RequestStats.fromObject(object.requestStats); - } - return message; - }; + /** + * 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 + */ - /** - * 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) { - if (!options) - options = {}; - 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); + /** + * 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) + this[keys[i]] = properties[keys[i]]; } - 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); - } - if (message.lastScannedRowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("requestStats")) - object.requestStats = $root.google.bigtable.v2.RequestStats.toObject(message.requestStats, options); - 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); - }; + /** + * Map keyType. + * @member {google.bigtable.admin.v2.IType|null|undefined} keyType + * @memberof google.bigtable.admin.v2.Type.Map + * @instance + */ + Map.prototype.keyType = null; - /** - * 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"; - }; + /** + * Map valueType. + * @member {google.bigtable.admin.v2.IType|null|undefined} valueType + * @memberof google.bigtable.admin.v2.Type.Map + * @instance + */ + Map.prototype.valueType = null; - ReadRowsResponse.CellChunk = (function() { + /** + * 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); + }; - /** - * 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 - */ + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).ldelim(); + return writer; + }; - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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).ldelim(); + }; - /** - * CellChunk rowKey. - * @member {Uint8Array} rowKey - * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk - * @instance - */ - CellChunk.prototype.rowKey = $util.newBuffer([]); + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.keyType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.valueType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * CellChunk familyName. - * @member {google.protobuf.IStringValue|null|undefined} familyName - * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk - * @instance - */ - CellChunk.prototype.familyName = null; + /** + * 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()); + }; - /** - * CellChunk qualifier. - * @member {google.protobuf.IBytesValue|null|undefined} qualifier - * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk - * @instance - */ - CellChunk.prototype.qualifier = null; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyType != null && message.hasOwnProperty("keyType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.keyType); + if (error) + return "keyType." + error; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType); + if (error) + return "valueType." + error; + } + return 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; + /** + * 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Map) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Map(); + if (object.keyType != null) { + if (typeof object.keyType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Map.keyType: object expected"); + message.keyType = $root.google.bigtable.admin.v2.Type.fromObject(object.keyType); + } + if (object.valueType != null) { + if (typeof object.valueType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Map.valueType: object expected"); + message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType); + } + return message; + }; - /** - * CellChunk labels. - * @member {Array.} labels - * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk - * @instance - */ - CellChunk.prototype.labels = $util.emptyArray; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyType = null; + object.valueType = null; + } + if (message.keyType != null && message.hasOwnProperty("keyType")) + object.keyType = $root.google.bigtable.admin.v2.Type.toObject(message.keyType, options); + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options); + return object; + }; - /** - * CellChunk value. - * @member {Uint8Array} value - * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk - * @instance - */ - CellChunk.prototype.value = $util.newBuffer([]); + /** + * 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); + }; - /** - * CellChunk valueSize. - * @member {number} valueSize - * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk - * @instance - */ - CellChunk.prototype.valueSize = 0; + /** + * 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"; + }; - /** - * CellChunk resetRow. - * @member {boolean|null|undefined} resetRow - * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk - * @instance - */ - CellChunk.prototype.resetRow = null; + return Map; + })(); - /** - * CellChunk commitRow. - * @member {boolean|null|undefined} commitRow - * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk - * @instance - */ - CellChunk.prototype.commitRow = null; + Type.Aggregate = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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 + */ - /** - * 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) - }); + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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); - }; + /** + * Aggregate inputType. + * @member {google.bigtable.admin.v2.IType|null|undefined} inputType + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.inputType = null; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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; - }; + /** + * Aggregate stateType. + * @member {google.bigtable.admin.v2.IType|null|undefined} stateType + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.stateType = null; - /** - * 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).ldelim(); - }; + /** + * 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; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.rowKey = reader.bytes(); - break; - } - case 2: { - message.familyName = $root.google.protobuf.StringValue.decode(reader, reader.uint32()); - break; - } - case 3: { - message.qualifier = $root.google.protobuf.BytesValue.decode(reader, reader.uint32()); - 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); - break; - } - } - return message; - }; + /** + * 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; - /** - * 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()); - }; + /** + * 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; - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) { - var error = $root.google.protobuf.StringValue.verify(message.familyName); - if (error) - return "familyName." + error; - } - if (message.qualifier != null && message.hasOwnProperty("qualifier")) { - var error = $root.google.protobuf.BytesValue.verify(message.qualifier); - if (error) - return "qualifier." + error; - } - if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - if (message.valueSize != null && message.hasOwnProperty("valueSize")) - if (!$util.isInteger(message.valueSize)) - return "valueSize: integer expected"; - if (message.resetRow != null && message.hasOwnProperty("resetRow")) { - properties.rowStatus = 1; - if (typeof message.resetRow !== "boolean") - return "resetRow: boolean expected"; - } - if (message.commitRow != null && message.hasOwnProperty("commitRow")) { - if (properties.rowStatus === 1) - return "rowStatus: multiple values"; - properties.rowStatus = 1; - if (typeof message.commitRow !== "boolean") - return "commitRow: boolean expected"; - } - return 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; - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.ReadRowsResponse.CellChunk) - return object; - 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 (typeof object.familyName !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.familyName: object expected"); - message.familyName = $root.google.protobuf.StringValue.fromObject(object.familyName); - } - if (object.qualifier != null) { - if (typeof object.qualifier !== "object") - throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier: object expected"); - message.qualifier = $root.google.protobuf.BytesValue.fromObject(object.qualifier); - } - if (object.timestampMicros != null) - if ($util.Long) - (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = 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; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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) { - if (!options) - options = {}; - 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() : long; - } else - object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("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 && message.hasOwnProperty("familyName")) - object.familyName = $root.google.protobuf.StringValue.toObject(message.familyName, options); - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - object.qualifier = $root.google.protobuf.BytesValue.toObject(message.qualifier, options); - if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) - 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 && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.valueSize != null && message.hasOwnProperty("valueSize")) - object.valueSize = message.valueSize; - if (message.resetRow != null && message.hasOwnProperty("resetRow")) { - object.resetRow = message.resetRow; - if (options.oneofs) - object.rowStatus = "resetRow"; - } - if (message.commitRow != null && message.hasOwnProperty("commitRow")) { - object.commitRow = message.commitRow; - if (options.oneofs) - object.rowStatus = "commitRow"; - } - return object; - }; + /** + * 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) + }); - /** - * 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); - }; + /** + * 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); + }; - /** - * 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"; - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).ldelim(); + return writer; + }; - return CellChunk; - })(); + /** + * 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).ldelim(); + }; - return ReadRowsResponse; - })(); + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.inputType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stateType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + case 4: { + message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.decode(reader, reader.uint32()); + break; + } + case 5: { + message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.decode(reader, reader.uint32()); + break; + } + case 6: { + message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.decode(reader, reader.uint32()); + break; + } + case 7: { + message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - v2.SampleRowKeysRequest = (function() { + /** + * 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()); + }; - /** - * 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} [appProfileId] SampleRowKeysRequest appProfileId - */ + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inputType != null && message.hasOwnProperty("inputType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.inputType); + if (error) + return "inputType." + error; + } + if (message.stateType != null && message.hasOwnProperty("stateType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.stateType); + if (error) + return "stateType." + error; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + properties.aggregator = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.verify(message.sum); + if (error) + return "sum." + error; + } + } + if (message.hllppUniqueCount != null && message.hasOwnProperty("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); + if (error) + return "hllppUniqueCount." + error; + } + } + if (message.max != null && message.hasOwnProperty("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); + if (error) + return "max." + error; + } + } + if (message.min != null && message.hasOwnProperty("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); + if (error) + return "min." + error; + } + } + return null; + }; - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Aggregate(); + if (object.inputType != null) { + if (typeof object.inputType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.inputType: object expected"); + message.inputType = $root.google.bigtable.admin.v2.Type.fromObject(object.inputType); + } + if (object.stateType != null) { + if (typeof object.stateType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.stateType: object expected"); + message.stateType = $root.google.bigtable.admin.v2.Type.fromObject(object.stateType); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.sum: object expected"); + message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.fromObject(object.sum); + } + if (object.hllppUniqueCount != null) { + if (typeof object.hllppUniqueCount !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.hllppUniqueCount: object expected"); + message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount); + } + if (object.max != null) { + if (typeof object.max !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.max: object expected"); + message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.fromObject(object.max); + } + if (object.min != null) { + if (typeof object.min !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.min: object expected"); + message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.fromObject(object.min); + } + return message; + }; - /** - * SampleRowKeysRequest tableName. - * @member {string} tableName - * @memberof google.bigtable.v2.SampleRowKeysRequest - * @instance - */ - SampleRowKeysRequest.prototype.tableName = ""; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputType = null; + object.stateType = null; + } + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = $root.google.bigtable.admin.v2.Type.toObject(message.inputType, options); + if (message.stateType != null && message.hasOwnProperty("stateType")) + object.stateType = $root.google.bigtable.admin.v2.Type.toObject(message.stateType, options); + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.toObject(message.sum, options); + if (options.oneofs) + object.aggregator = "sum"; + } + if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { + object.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options); + if (options.oneofs) + object.aggregator = "hllppUniqueCount"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.toObject(message.max, options); + if (options.oneofs) + object.aggregator = "max"; + } + if (message.min != null && message.hasOwnProperty("min")) { + object.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.toObject(message.min, options); + if (options.oneofs) + object.aggregator = "min"; + } + return object; + }; - /** - * SampleRowKeysRequest authorizedViewName. - * @member {string} authorizedViewName - * @memberof google.bigtable.v2.SampleRowKeysRequest - * @instance - */ - SampleRowKeysRequest.prototype.authorizedViewName = ""; + /** + * 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); + }; - /** - * SampleRowKeysRequest appProfileId. - * @member {string} appProfileId - * @memberof google.bigtable.v2.SampleRowKeysRequest - * @instance - */ - SampleRowKeysRequest.prototype.appProfileId = ""; + /** + * 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"; + }; - /** - * 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); - }; + Aggregate.Sum = (function() { - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.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); - return writer; - }; + /** + * Properties of a Sum. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @interface ISum + */ - /** - * 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableName = reader.string(); - break; - } - case 4: { - message.authorizedViewName = reader.string(); - break; - } - case 2: { - message.appProfileId = reader.string(); - break; + /** + * 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) + this[keys[i]] = properties[keys[i]]; } - default: - reader.skipType(tag & 7); - 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()); - }; + /** + * 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); + }; - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - return null; - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.SampleRowKeysRequest) - return object; - 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.appProfileId != null) - message.appProfileId = String(object.appProfileId); - return message; - }; + /** + * 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).ldelim(); + }; - /** - * 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tableName = ""; - object.appProfileId = ""; - object.authorizedViewName = ""; - } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - object.authorizedViewName = message.authorizedViewName; - return object; - }; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * 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()); + }; - /** - * 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"; - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - return SampleRowKeysRequest; - })(); + /** + * 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Sum) + return object; + return new $root.google.bigtable.admin.v2.Type.Aggregate.Sum(); + }; - v2.SampleRowKeysResponse = (function() { + /** + * 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 {}; + }; - /** - * Properties of a SampleRowKeysResponse. - * @memberof google.bigtable.v2 - * @interface ISampleRowKeysResponse - * @property {Uint8Array|null} [rowKey] SampleRowKeysResponse rowKey - * @property {number|Long|null} [offsetBytes] SampleRowKeysResponse offsetBytes - */ + /** + * 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); + }; - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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"; + }; - /** - * SampleRowKeysResponse rowKey. - * @member {Uint8Array} rowKey - * @memberof google.bigtable.v2.SampleRowKeysResponse - * @instance - */ - SampleRowKeysResponse.prototype.rowKey = $util.newBuffer([]); + return Sum; + })(); - /** - * SampleRowKeysResponse offsetBytes. - * @member {number|Long} offsetBytes - * @memberof google.bigtable.v2.SampleRowKeysResponse - * @instance - */ - SampleRowKeysResponse.prototype.offsetBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Aggregate.Max = (function() { - /** - * 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); - }; + /** + * Properties of a Max. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @interface IMax + */ - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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; - }; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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).ldelim(); - }; + /** + * 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); + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rowKey = reader.bytes(); - break; - } - case 2: { - message.offsetBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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()); - }; + /** + * 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).ldelim(); + }; - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.offsetBytes != null && message.hasOwnProperty("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; - }; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.SampleRowKeysResponse) - return object; - 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)).unsigned = 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; - }; + /** + * 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()); + }; - /** - * 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) { - if (!options) - options = {}; - 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() : long; - } else - object.offsetBytes = options.longs === String ? "0" : 0; - } - if (message.rowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("offsetBytes")) - 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; - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * 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); - }; + /** + * 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) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Max) + return object; + return new $root.google.bigtable.admin.v2.Type.Aggregate.Max(); + }; - /** - * 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"; - }; + /** + * 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 {}; + }; - return SampleRowKeysResponse; + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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; })(); - v2.MutateRowRequest = (function() { + return admin; + })(); - /** - * 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 - */ + bigtable.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.bigtable + * @namespace + */ + var v2 = {}; + + v2.Bigtable = (function() { /** - * Constructs a new MutateRowRequest. + * Constructs a new Bigtable service. * @memberof google.bigtable.v2 - * @classdesc Represents a MutateRowRequest. - * @implements IMutateRowRequest + * @classdesc Represents a Bigtable + * @extends $protobuf.rpc.Service * @constructor - * @param {google.bigtable.v2.IMutateRowRequest=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function MutateRowRequest(properties) { - this.mutations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Bigtable(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * MutateRowRequest tableName. - * @member {string} tableName - * @memberof google.bigtable.v2.MutateRowRequest - * @instance - */ - MutateRowRequest.prototype.tableName = ""; + (Bigtable.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Bigtable; /** - * MutateRowRequest authorizedViewName. - * @member {string} authorizedViewName - * @memberof google.bigtable.v2.MutateRowRequest - * @instance + * 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. */ - MutateRowRequest.prototype.authorizedViewName = ""; + Bigtable.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * MutateRowRequest appProfileId. - * @member {string} appProfileId - * @memberof google.bigtable.v2.MutateRowRequest - * @instance + * 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 */ - MutateRowRequest.prototype.appProfileId = ""; /** - * MutateRowRequest rowKey. - * @member {Uint8Array} rowKey - * @memberof google.bigtable.v2.MutateRowRequest + * 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 */ - MutateRowRequest.prototype.rowKey = $util.newBuffer([]); + Object.defineProperty(Bigtable.prototype.readRows = function readRows(request, callback) { + return this.rpcCall(readRows, $root.google.bigtable.v2.ReadRowsRequest, $root.google.bigtable.v2.ReadRowsResponse, request, callback); + }, "name", { value: "ReadRows" }); /** - * MutateRowRequest mutations. - * @member {Array.} mutations - * @memberof google.bigtable.v2.MutateRowRequest + * 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 */ - MutateRowRequest.prototype.mutations = $util.emptyArray; /** - * 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 + * 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 */ - 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 + * 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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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 this.rpcCall(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|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 this.rpcCall(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 + */ + + 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} [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) + 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 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 */ - MutateRowRequest.encode = function encode(message, writer) { + ReadRowsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); - if (message.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()).ldelim(); + 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()).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()).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 4, wireType 2 =*/34).string(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 6, wireType 2 =*/50).string(message.authorizedViewName); + writer.uint32(/* id 9, wireType 2 =*/74).string(message.authorizedViewName); return writer; }; /** - * Encodes the specified MutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowRequest.verify|verify} messages. + * Encodes the specified ReadRowsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadRowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.MutateRowRequest + * @memberof google.bigtable.v2.ReadRowsRequest * @static - * @param {google.bigtable.v2.IMutateRowRequest} message MutateRowRequest message or plain object to encode + * @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 */ - MutateRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReadRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MutateRowRequest message from the specified reader or buffer. + * Decodes a ReadRowsRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.MutateRowRequest + * @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.MutateRowRequest} MutateRowRequest + * @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 */ - MutateRowRequest.decode = function decode(reader, length) { + ReadRowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -34349,22 +35703,32 @@ message.tableName = reader.string(); break; } - case 6: { + case 9: { message.authorizedViewName = reader.string(); break; } - case 4: { + case 5: { message.appProfileId = reader.string(); break; } case 2: { - message.rowKey = reader.bytes(); + message.rows = $root.google.bigtable.v2.RowSet.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.mutations && message.mutations.length)) - message.mutations = []; - message.mutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); + message.filter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.rowsLimit = reader.int64(); + break; + } + case 6: { + message.requestStatsView = reader.int32(); + break; + } + case 7: { + message.reversed = reader.bool(); break; } default: @@ -34376,30 +35740,30 @@ }; /** - * Decodes a MutateRowRequest message from the specified reader or buffer, length delimited. + * Decodes a ReadRowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.MutateRowRequest + * @memberof google.bigtable.v2.ReadRowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.MutateRowRequest} MutateRowRequest + * @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 */ - MutateRowRequest.decodeDelimited = function decodeDelimited(reader) { + ReadRowsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MutateRowRequest message. + * Verifies a ReadRowsRequest message. * @function verify - * @memberof google.bigtable.v2.MutateRowRequest + * @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 */ - MutateRowRequest.verify = function verify(message) { + ReadRowsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.tableName != null && message.hasOwnProperty("tableName")) @@ -34411,146 +35775,211 @@ if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.mutations != null && message.hasOwnProperty("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]); - if (error) - return "mutations." + error; - } + if (message.rows != null && message.hasOwnProperty("rows")) { + var error = $root.google.bigtable.v2.RowSet.verify(message.rows); + if (error) + return "rows." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filter); + if (error) + return "filter." + error; } + if (message.rowsLimit != null && message.hasOwnProperty("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 && message.hasOwnProperty("requestStatsView")) + switch (message.requestStatsView) { + default: + return "requestStatsView: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.reversed != null && message.hasOwnProperty("reversed")) + if (typeof message.reversed !== "boolean") + return "reversed: boolean expected"; return null; }; /** - * Creates a MutateRowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReadRowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.MutateRowRequest + * @memberof google.bigtable.v2.ReadRowsRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.MutateRowRequest} MutateRowRequest + * @returns {google.bigtable.v2.ReadRowsRequest} ReadRowsRequest */ - MutateRowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.MutateRowRequest) + ReadRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.ReadRowsRequest) return object; - var message = new $root.google.bigtable.v2.MutateRowRequest(); + 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.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 (typeof object.mutations[i] !== "object") - throw TypeError(".google.bigtable.v2.MutateRowRequest.mutations: object expected"); - message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i]); + if (object.rows != null) { + if (typeof object.rows !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsRequest.rows: object expected"); + message.rows = $root.google.bigtable.v2.RowSet.fromObject(object.rows); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsRequest.filter: object expected"); + message.filter = $root.google.bigtable.v2.RowFilter.fromObject(object.filter); + } + if (object.rowsLimit != null) + if ($util.Long) + (message.rowsLimit = $util.Long.fromValue(object.rowsLimit)).unsigned = 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 MutateRowRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReadRowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.MutateRowRequest + * @memberof google.bigtable.v2.ReadRowsRequest * @static - * @param {google.bigtable.v2.MutateRowRequest} message MutateRowRequest + * @param {google.bigtable.v2.ReadRowsRequest} message ReadRowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MutateRowRequest.toObject = function toObject(message, options) { + ReadRowsRequest.toObject = function toObject(message, options) { if (!options) options = {}; 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.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() : long; + } else + object.rowsLimit = options.longs === String ? "0" : 0; object.appProfileId = ""; + object.requestStatsView = options.enums === String ? "REQUEST_STATS_VIEW_UNSPECIFIED" : 0; + object.reversed = false; object.authorizedViewName = ""; } if (message.tableName != null && message.hasOwnProperty("tableName")) object.tableName = message.tableName; - if (message.rowKey != null && message.hasOwnProperty("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); - } + if (message.rows != null && message.hasOwnProperty("rows")) + object.rows = $root.google.bigtable.v2.RowSet.toObject(message.rows, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.bigtable.v2.RowFilter.toObject(message.filter, options); + if (message.rowsLimit != null && message.hasOwnProperty("rowsLimit")) + 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 && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; + if (message.requestStatsView != null && message.hasOwnProperty("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 && message.hasOwnProperty("reversed")) + object.reversed = message.reversed; if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) object.authorizedViewName = message.authorizedViewName; return object; }; /** - * Converts this MutateRowRequest to JSON. + * Converts this ReadRowsRequest to JSON. * @function toJSON - * @memberof google.bigtable.v2.MutateRowRequest + * @memberof google.bigtable.v2.ReadRowsRequest * @instance * @returns {Object.} JSON object */ - MutateRowRequest.prototype.toJSON = function toJSON() { + ReadRowsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MutateRowRequest + * Gets the default type url for ReadRowsRequest * @function getTypeUrl - * @memberof google.bigtable.v2.MutateRowRequest + * @memberof google.bigtable.v2.ReadRowsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MutateRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReadRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.MutateRowRequest"; + return typeUrlPrefix + "/google.bigtable.v2.ReadRowsRequest"; }; - return MutateRowRequest; + /** + * 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.MutateRowResponse = (function() { + v2.ReadRowsResponse = (function() { /** - * Properties of a MutateRowResponse. + * Properties of a ReadRowsResponse. * @memberof google.bigtable.v2 - * @interface IMutateRowResponse + * @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 MutateRowResponse. + * Constructs a new ReadRowsResponse. * @memberof google.bigtable.v2 - * @classdesc Represents a MutateRowResponse. - * @implements IMutateRowResponse + * @classdesc Represents a ReadRowsResponse. + * @implements IReadRowsResponse * @constructor - * @param {google.bigtable.v2.IMutateRowResponse=} [properties] Properties to set + * @param {google.bigtable.v2.IReadRowsResponse=} [properties] Properties to set */ - function MutateRowResponse(properties) { + function ReadRowsResponse(properties) { + this.chunks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34558,63 +35987,108 @@ } /** - * Creates a new MutateRowResponse instance using the specified properties. + * 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.MutateRowResponse + * @memberof google.bigtable.v2.ReadRowsResponse * @static - * @param {google.bigtable.v2.IMutateRowResponse=} [properties] Properties to set - * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse instance + * @param {google.bigtable.v2.IReadRowsResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadRowsResponse} ReadRowsResponse instance */ - MutateRowResponse.create = function create(properties) { - return new MutateRowResponse(properties); + ReadRowsResponse.create = function create(properties) { + return new ReadRowsResponse(properties); }; /** - * Encodes the specified MutateRowResponse message. Does not implicitly {@link google.bigtable.v2.MutateRowResponse.verify|verify} messages. + * Encodes the specified ReadRowsResponse message. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.MutateRowResponse + * @memberof google.bigtable.v2.ReadRowsResponse * @static - * @param {google.bigtable.v2.IMutateRowResponse} message MutateRowResponse message or plain object to encode + * @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 */ - MutateRowResponse.encode = function encode(message, writer) { + ReadRowsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + 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()).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()).ldelim(); return writer; }; /** - * Encodes the specified MutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowResponse.verify|verify} messages. + * Encodes the specified ReadRowsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.MutateRowResponse + * @memberof google.bigtable.v2.ReadRowsResponse * @static - * @param {google.bigtable.v2.IMutateRowResponse} message MutateRowResponse message or plain object to encode + * @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 */ - MutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { + ReadRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MutateRowResponse message from the specified reader or buffer. + * Decodes a ReadRowsResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.MutateRowResponse + * @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.MutateRowResponse} MutateRowResponse + * @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 */ - MutateRowResponse.decode = function decode(reader, length) { + ReadRowsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsResponse(); while (reader.pos < end) { var tag = reader.uint32(); 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())); + break; + } + case 2: { + message.lastScannedRowKey = reader.bytes(); + break; + } + case 3: { + message.requestStats = $root.google.bigtable.v2.RequestStats.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -34624,485 +36098,343 @@ }; /** - * Decodes a MutateRowResponse message from the specified reader or buffer, length delimited. + * Decodes a ReadRowsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.MutateRowResponse + * @memberof google.bigtable.v2.ReadRowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse + * @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 */ - MutateRowResponse.decodeDelimited = function decodeDelimited(reader) { + ReadRowsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MutateRowResponse message. + * Verifies a ReadRowsResponse message. * @function verify - * @memberof google.bigtable.v2.MutateRowResponse + * @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 */ - MutateRowResponse.verify = function verify(message) { + ReadRowsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.chunks != null && message.hasOwnProperty("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]); + if (error) + return "chunks." + error; + } + } + if (message.lastScannedRowKey != null && message.hasOwnProperty("lastScannedRowKey")) + if (!(message.lastScannedRowKey && typeof message.lastScannedRowKey.length === "number" || $util.isString(message.lastScannedRowKey))) + return "lastScannedRowKey: buffer expected"; + if (message.requestStats != null && message.hasOwnProperty("requestStats")) { + var error = $root.google.bigtable.v2.RequestStats.verify(message.requestStats); + if (error) + return "requestStats." + error; + } return null; }; /** - * Creates a MutateRowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReadRowsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.MutateRowResponse + * @memberof google.bigtable.v2.ReadRowsResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse + * @returns {google.bigtable.v2.ReadRowsResponse} ReadRowsResponse */ - MutateRowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.MutateRowResponse) + ReadRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.ReadRowsResponse) return object; - return new $root.google.bigtable.v2.MutateRowResponse(); + 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 (typeof object.chunks[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsResponse.chunks: object expected"); + message.chunks[i] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.fromObject(object.chunks[i]); + } + } + 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 (typeof object.requestStats !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsResponse.requestStats: object expected"); + message.requestStats = $root.google.bigtable.v2.RequestStats.fromObject(object.requestStats); + } + return message; }; /** - * Creates a plain object from a MutateRowResponse message. Also converts values to other types if specified. + * Creates a plain object from a ReadRowsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.MutateRowResponse + * @memberof google.bigtable.v2.ReadRowsResponse * @static - * @param {google.bigtable.v2.MutateRowResponse} message MutateRowResponse + * @param {google.bigtable.v2.ReadRowsResponse} message ReadRowsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MutateRowResponse.toObject = function toObject() { - return {}; + ReadRowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + 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); + } + if (message.lastScannedRowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("requestStats")) + object.requestStats = $root.google.bigtable.v2.RequestStats.toObject(message.requestStats, options); + return object; }; /** - * Converts this MutateRowResponse to JSON. + * Converts this ReadRowsResponse to JSON. * @function toJSON - * @memberof google.bigtable.v2.MutateRowResponse + * @memberof google.bigtable.v2.ReadRowsResponse * @instance * @returns {Object.} JSON object */ - MutateRowResponse.prototype.toJSON = function toJSON() { + ReadRowsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MutateRowResponse + * Gets the default type url for ReadRowsResponse * @function getTypeUrl - * @memberof google.bigtable.v2.MutateRowResponse + * @memberof google.bigtable.v2.ReadRowsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MutateRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReadRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.MutateRowResponse"; + return typeUrlPrefix + "/google.bigtable.v2.ReadRowsResponse"; }; - return MutateRowResponse; - })(); + ReadRowsResponse.CellChunk = (function() { - v2.MutateRowsRequest = (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 + */ - /** - * 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 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * CellChunk rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.rowKey = $util.newBuffer([]); - /** - * MutateRowsRequest tableName. - * @member {string} tableName - * @memberof google.bigtable.v2.MutateRowsRequest - * @instance - */ - MutateRowsRequest.prototype.tableName = ""; + /** + * CellChunk familyName. + * @member {google.protobuf.IStringValue|null|undefined} familyName + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.familyName = null; - /** - * MutateRowsRequest authorizedViewName. - * @member {string} authorizedViewName - * @memberof google.bigtable.v2.MutateRowsRequest - * @instance - */ - MutateRowsRequest.prototype.authorizedViewName = ""; + /** + * CellChunk qualifier. + * @member {google.protobuf.IBytesValue|null|undefined} qualifier + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.qualifier = null; - /** - * MutateRowsRequest appProfileId. - * @member {string} appProfileId - * @memberof google.bigtable.v2.MutateRowsRequest - * @instance - */ - MutateRowsRequest.prototype.appProfileId = ""; + /** + * 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; - /** - * MutateRowsRequest entries. - * @member {Array.} entries - * @memberof google.bigtable.v2.MutateRowsRequest - * @instance - */ - MutateRowsRequest.prototype.entries = $util.emptyArray; + /** + * CellChunk labels. + * @member {Array.} labels + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.labels = $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); - }; + /** + * CellChunk value. + * @member {Uint8Array} value + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.value = $util.newBuffer([]); - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.entries != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.MutateRowsRequest) - return object; - 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 (typeof object.entries[i] !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsRequest.entries: object expected"); - message.entries[i] = $root.google.bigtable.v2.MutateRowsRequest.Entry.fromObject(object.entries[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) { - object.tableName = ""; - object.appProfileId = ""; - object.authorizedViewName = ""; - } - if (message.tableName != null && message.hasOwnProperty("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); - } - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("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 - */ + /** + * CellChunk valueSize. + * @member {number} valueSize + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.valueSize = 0; /** - * 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 + * CellChunk resetRow. + * @member {boolean|null|undefined} resetRow + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance */ - function Entry(properties) { - this.mutations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + CellChunk.prototype.resetRow = null; /** - * Entry rowKey. - * @member {Uint8Array} rowKey - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * CellChunk commitRow. + * @member {boolean|null|undefined} commitRow + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @instance */ - Entry.prototype.rowKey = $util.newBuffer([]); + CellChunk.prototype.commitRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Entry mutations. - * @member {Array.} mutations - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * CellChunk rowStatus. + * @member {"resetRow"|"commitRow"|undefined} rowStatus + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @instance */ - Entry.prototype.mutations = $util.emptyArray; + Object.defineProperty(CellChunk.prototype, "rowStatus", { + get: $util.oneOfGetter($oneOfFields = ["resetRow", "commitRow"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Entry instance using the specified properties. + * Creates a new CellChunk instance using the specified properties. * @function create - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @static - * @param {google.bigtable.v2.MutateRowsRequest.IEntry=} [properties] Properties to set - * @returns {google.bigtable.v2.MutateRowsRequest.Entry} Entry instance + * @param {google.bigtable.v2.ReadRowsResponse.ICellChunk=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadRowsResponse.CellChunk} CellChunk instance */ - Entry.create = function create(properties) { - return new Entry(properties); + CellChunk.create = function create(properties) { + return new CellChunk(properties); }; /** - * Encodes the specified Entry message. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.Entry.verify|verify} messages. + * Encodes the specified CellChunk message. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.CellChunk.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @static - * @param {google.bigtable.v2.MutateRowsRequest.IEntry} message Entry message or plain object to encode + * @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 */ - Entry.encode = function encode(message, writer) { + CellChunk.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); 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()).ldelim(); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + $root.google.protobuf.StringValue.encode(message.familyName, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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()).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 Entry message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.Entry.verify|verify} messages. + * 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.MutateRowsRequest.Entry + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @static - * @param {google.bigtable.v2.MutateRowsRequest.IEntry} message Entry message or plain object to encode + * @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 */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { + CellChunk.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Entry message from the specified reader or buffer. + * Decodes a CellChunk message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @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.MutateRowsRequest.Entry} Entry + * @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 */ - Entry.decode = function decode(reader, length) { + CellChunk.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsRequest.Entry(); + 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(); switch (tag >>> 3) { @@ -35111,9 +36443,37 @@ break; } case 2: { - if (!(message.mutations && message.mutations.length)) - message.mutations = []; - message.mutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); + message.familyName = $root.google.protobuf.StringValue.decode(reader, reader.uint32()); + break; + } + case 3: { + message.qualifier = $root.google.protobuf.BytesValue.decode(reader, reader.uint32()); + 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: @@ -35125,93 +36485,150 @@ }; /** - * Decodes an Entry message from the specified reader or buffer, length delimited. + * Decodes a CellChunk message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.MutateRowsRequest.Entry} Entry + * @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 */ - Entry.decodeDelimited = function decodeDelimited(reader) { + CellChunk.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Entry message. + * Verifies a CellChunk message. * @function verify - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @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 */ - Entry.verify = function verify(message) { + CellChunk.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.rowKey != null && message.hasOwnProperty("rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.mutations != null && message.hasOwnProperty("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]); - if (error) - return "mutations." + error; - } + if (message.familyName != null && message.hasOwnProperty("familyName")) { + var error = $root.google.protobuf.StringValue.verify(message.familyName); + if (error) + return "familyName." + error; + } + if (message.qualifier != null && message.hasOwnProperty("qualifier")) { + var error = $root.google.protobuf.BytesValue.verify(message.qualifier); + if (error) + return "qualifier." + error; + } + if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.valueSize != null && message.hasOwnProperty("valueSize")) + if (!$util.isInteger(message.valueSize)) + return "valueSize: integer expected"; + if (message.resetRow != null && message.hasOwnProperty("resetRow")) { + properties.rowStatus = 1; + if (typeof message.resetRow !== "boolean") + return "resetRow: boolean expected"; + } + if (message.commitRow != null && message.hasOwnProperty("commitRow")) { + if (properties.rowStatus === 1) + return "rowStatus: multiple values"; + properties.rowStatus = 1; + if (typeof message.commitRow !== "boolean") + return "commitRow: boolean expected"; } return null; }; /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * Creates a CellChunk message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.MutateRowsRequest.Entry} Entry + * @returns {google.bigtable.v2.ReadRowsResponse.CellChunk} CellChunk */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.MutateRowsRequest.Entry) + CellChunk.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.ReadRowsResponse.CellChunk) return object; - var message = new $root.google.bigtable.v2.MutateRowsRequest.Entry(); + 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.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 (typeof object.mutations[i] !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.mutations: object expected"); - message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i]); - } + if (object.familyName != null) { + if (typeof object.familyName !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.familyName: object expected"); + message.familyName = $root.google.protobuf.StringValue.fromObject(object.familyName); + } + if (object.qualifier != null) { + if (typeof object.qualifier !== "object") + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier: object expected"); + message.qualifier = $root.google.protobuf.BytesValue.fromObject(object.qualifier); + } + if (object.timestampMicros != null) + if ($util.Long) + (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = 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 an Entry message. Also converts values to other types if specified. + * Creates a plain object from a CellChunk message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @static - * @param {google.bigtable.v2.MutateRowsRequest.Entry} message Entry + * @param {google.bigtable.v2.ReadRowsResponse.CellChunk} message CellChunk * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + CellChunk.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.mutations = []; - if (options.defaults) + object.labels = []; + if (options.defaults) { if (options.bytes === String) object.rowKey = ""; else { @@ -35219,68 +36636,107 @@ 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() : long; + } else + object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("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); + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = $root.google.protobuf.StringValue.toObject(message.familyName, options); + if (message.qualifier != null && message.hasOwnProperty("qualifier")) + object.qualifier = $root.google.protobuf.BytesValue.toObject(message.qualifier, options); + if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) + 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]; } - 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); + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.valueSize != null && message.hasOwnProperty("valueSize")) + object.valueSize = message.valueSize; + if (message.resetRow != null && message.hasOwnProperty("resetRow")) { + object.resetRow = message.resetRow; + if (options.oneofs) + object.rowStatus = "resetRow"; + } + if (message.commitRow != null && message.hasOwnProperty("commitRow")) { + object.commitRow = message.commitRow; + if (options.oneofs) + object.rowStatus = "commitRow"; + } + return object; }; /** - * Gets the default type url for Entry + * 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.MutateRowsRequest.Entry + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CellChunk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.MutateRowsRequest.Entry"; + return typeUrlPrefix + "/google.bigtable.v2.ReadRowsResponse.CellChunk"; }; - return Entry; + return CellChunk; })(); - return MutateRowsRequest; + return ReadRowsResponse; })(); - v2.MutateRowsResponse = (function() { + v2.SampleRowKeysRequest = (function() { /** - * Properties of a MutateRowsResponse. + * Properties of a SampleRowKeysRequest. * @memberof google.bigtable.v2 - * @interface IMutateRowsResponse - * @property {Array.|null} [entries] MutateRowsResponse entries - * @property {google.bigtable.v2.IRateLimitInfo|null} [rateLimitInfo] MutateRowsResponse rateLimitInfo + * @interface ISampleRowKeysRequest + * @property {string|null} [tableName] SampleRowKeysRequest tableName + * @property {string|null} [authorizedViewName] SampleRowKeysRequest authorizedViewName + * @property {string|null} [appProfileId] SampleRowKeysRequest appProfileId */ /** - * Constructs a new MutateRowsResponse. + * Constructs a new SampleRowKeysRequest. * @memberof google.bigtable.v2 - * @classdesc Represents a MutateRowsResponse. - * @implements IMutateRowsResponse + * @classdesc Represents a SampleRowKeysRequest. + * @implements ISampleRowKeysRequest * @constructor - * @param {google.bigtable.v2.IMutateRowsResponse=} [properties] Properties to set + * @param {google.bigtable.v2.ISampleRowKeysRequest=} [properties] Properties to set */ - function MutateRowsResponse(properties) { - this.entries = []; + function SampleRowKeysRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35288,106 +36744,103 @@ } /** - * MutateRowsResponse entries. - * @member {Array.} entries - * @memberof google.bigtable.v2.MutateRowsResponse + * SampleRowKeysRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.SampleRowKeysRequest * @instance */ - MutateRowsResponse.prototype.entries = $util.emptyArray; + SampleRowKeysRequest.prototype.tableName = ""; /** - * MutateRowsResponse rateLimitInfo. - * @member {google.bigtable.v2.IRateLimitInfo|null|undefined} rateLimitInfo - * @memberof google.bigtable.v2.MutateRowsResponse + * SampleRowKeysRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.SampleRowKeysRequest * @instance */ - MutateRowsResponse.prototype.rateLimitInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + SampleRowKeysRequest.prototype.authorizedViewName = ""; /** - * MutateRowsResponse _rateLimitInfo. - * @member {"rateLimitInfo"|undefined} _rateLimitInfo - * @memberof google.bigtable.v2.MutateRowsResponse + * SampleRowKeysRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.SampleRowKeysRequest * @instance */ - Object.defineProperty(MutateRowsResponse.prototype, "_rateLimitInfo", { - get: $util.oneOfGetter($oneOfFields = ["rateLimitInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); + SampleRowKeysRequest.prototype.appProfileId = ""; /** - * Creates a new MutateRowsResponse instance using the specified properties. + * Creates a new SampleRowKeysRequest instance using the specified properties. * @function create - * @memberof google.bigtable.v2.MutateRowsResponse + * @memberof google.bigtable.v2.SampleRowKeysRequest * @static - * @param {google.bigtable.v2.IMutateRowsResponse=} [properties] Properties to set - * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse instance + * @param {google.bigtable.v2.ISampleRowKeysRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.SampleRowKeysRequest} SampleRowKeysRequest instance */ - MutateRowsResponse.create = function create(properties) { - return new MutateRowsResponse(properties); + SampleRowKeysRequest.create = function create(properties) { + return new SampleRowKeysRequest(properties); }; /** - * Encodes the specified MutateRowsResponse message. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.verify|verify} messages. + * Encodes the specified SampleRowKeysRequest message. Does not implicitly {@link google.bigtable.v2.SampleRowKeysRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.MutateRowsResponse + * @memberof google.bigtable.v2.SampleRowKeysRequest * @static - * @param {google.bigtable.v2.IMutateRowsResponse} message MutateRowsResponse message or plain object to encode + * @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 */ - MutateRowsResponse.encode = function encode(message, writer) { + SampleRowKeysRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.bigtable.v2.MutateRowsResponse.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) - $root.google.bigtable.v2.RateLimitInfo.encode(message.rateLimitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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); return writer; }; /** - * Encodes the specified MutateRowsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.verify|verify} messages. + * Encodes the specified SampleRowKeysRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SampleRowKeysRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.MutateRowsResponse + * @memberof google.bigtable.v2.SampleRowKeysRequest * @static - * @param {google.bigtable.v2.IMutateRowsResponse} message MutateRowsResponse message or plain object to encode + * @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 */ - MutateRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + SampleRowKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MutateRowsResponse message from the specified reader or buffer. + * Decodes a SampleRowKeysRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.MutateRowsResponse + * @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.MutateRowsResponse} MutateRowsResponse + * @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 */ - MutateRowsResponse.decode = function decode(reader, length) { + SampleRowKeysRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysRequest(); while (reader.pos < end) { var tag = reader.uint32(); 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())); + message.tableName = reader.string(); break; } - case 3: { - message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.decode(reader, reader.uint32()); + case 4: { + message.authorizedViewName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); break; } default: @@ -35399,644 +36852,394 @@ }; /** - * Decodes a MutateRowsResponse message from the specified reader or buffer, length delimited. + * Decodes a SampleRowKeysRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.MutateRowsResponse + * @memberof google.bigtable.v2.SampleRowKeysRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse + * @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 */ - MutateRowsResponse.decodeDelimited = function decodeDelimited(reader) { + SampleRowKeysRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MutateRowsResponse message. + * Verifies a SampleRowKeysRequest message. * @function verify - * @memberof google.bigtable.v2.MutateRowsResponse + * @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 */ - MutateRowsResponse.verify = function verify(message) { + SampleRowKeysRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.bigtable.v2.MutateRowsResponse.Entry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { - properties._rateLimitInfo = 1; - { - var error = $root.google.bigtable.v2.RateLimitInfo.verify(message.rateLimitInfo); - if (error) - return "rateLimitInfo." + error; - } - } + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; return null; }; /** - * Creates a MutateRowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SampleRowKeysRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.MutateRowsResponse + * @memberof google.bigtable.v2.SampleRowKeysRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse + * @returns {google.bigtable.v2.SampleRowKeysRequest} SampleRowKeysRequest */ - MutateRowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.MutateRowsResponse) + SampleRowKeysRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.SampleRowKeysRequest) return object; - 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 (typeof object.entries[i] !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsResponse.entries: object expected"); - message.entries[i] = $root.google.bigtable.v2.MutateRowsResponse.Entry.fromObject(object.entries[i]); - } - } - if (object.rateLimitInfo != null) { - if (typeof object.rateLimitInfo !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsResponse.rateLimitInfo: object expected"); - message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.fromObject(object.rateLimitInfo); - } + 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.appProfileId != null) + message.appProfileId = String(object.appProfileId); return message; }; /** - * Creates a plain object from a MutateRowsResponse message. Also converts values to other types if specified. + * Creates a plain object from a SampleRowKeysRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.MutateRowsResponse + * @memberof google.bigtable.v2.SampleRowKeysRequest * @static - * @param {google.bigtable.v2.MutateRowsResponse} message MutateRowsResponse + * @param {google.bigtable.v2.SampleRowKeysRequest} message SampleRowKeysRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MutateRowsResponse.toObject = function toObject(message, options) { + SampleRowKeysRequest.toObject = function toObject(message, options) { if (!options) options = {}; 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); - } - if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { - object.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.toObject(message.rateLimitInfo, options); - if (options.oneofs) - object._rateLimitInfo = "rateLimitInfo"; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.authorizedViewName = ""; } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; /** - * Converts this MutateRowsResponse to JSON. + * Converts this SampleRowKeysRequest to JSON. * @function toJSON - * @memberof google.bigtable.v2.MutateRowsResponse + * @memberof google.bigtable.v2.SampleRowKeysRequest * @instance * @returns {Object.} JSON object */ - MutateRowsResponse.prototype.toJSON = function toJSON() { + SampleRowKeysRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MutateRowsResponse + * Gets the default type url for SampleRowKeysRequest * @function getTypeUrl - * @memberof google.bigtable.v2.MutateRowsResponse + * @memberof google.bigtable.v2.SampleRowKeysRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MutateRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SampleRowKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.MutateRowsResponse"; + return typeUrlPrefix + "/google.bigtable.v2.SampleRowKeysRequest"; }; - MutateRowsResponse.Entry = (function() { + return SampleRowKeysRequest; + })(); - /** - * 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 - */ + v2.SampleRowKeysResponse = (function() { - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a SampleRowKeysResponse. + * @memberof google.bigtable.v2 + * @interface ISampleRowKeysResponse + * @property {Uint8Array|null} [rowKey] SampleRowKeysResponse rowKey + * @property {number|Long|null} [offsetBytes] SampleRowKeysResponse offsetBytes + */ - /** - * 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; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * Entry status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.bigtable.v2.MutateRowsResponse.Entry - * @instance - */ - Entry.prototype.status = null; + /** + * SampleRowKeysResponse rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @instance + */ + SampleRowKeysResponse.prototype.rowKey = $util.newBuffer([]); - /** - * 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); - }; + /** + * SampleRowKeysResponse offsetBytes. + * @member {number|Long} offsetBytes + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @instance + */ + SampleRowKeysResponse.prototype.offsetBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - return writer; - }; + /** + * 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 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).ldelim(); - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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; + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.index = reader.int64(); - break; - } - case 2: { - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowKey = reader.bytes(); + break; + } + case 2: { + message.offsetBytes = reader.int64(); break; } + default: + reader.skipType(tag & 7); + 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.index != null && message.hasOwnProperty("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 && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - 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) { - if (object instanceof $root.google.bigtable.v2.MutateRowsResponse.Entry) - return object; - var message = new $root.google.bigtable.v2.MutateRowsResponse.Entry(); - if (object.index != null) - if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = 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 (typeof object.status !== "object") - throw TypeError(".google.bigtable.v2.MutateRowsResponse.Entry.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); - } - 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) { - if (!options) - options = {}; - 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() : long; - } else - object.index = options.longs === String ? "0" : 0; - object.status = null; - } - if (message.index != null && message.hasOwnProperty("index")) - 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 && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.period != null && Object.hasOwnProperty.call(message, "period")) - $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.factor != null && Object.hasOwnProperty.call(message, "factor")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.factor); - return writer; - }; - - /** - * Encodes the specified RateLimitInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {google.bigtable.v2.IRateLimitInfo} message RateLimitInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RateLimitInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RateLimitInfo message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.v2.RateLimitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RateLimitInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RateLimitInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.factor = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + } + return message; + }; /** - * Decodes a RateLimitInfo message from the specified reader or buffer, length delimited. + * Decodes a SampleRowKeysResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.RateLimitInfo + * @memberof google.bigtable.v2.SampleRowKeysResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo + * @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 */ - RateLimitInfo.decodeDelimited = function decodeDelimited(reader) { + SampleRowKeysResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RateLimitInfo message. + * Verifies a SampleRowKeysResponse message. * @function verify - * @memberof google.bigtable.v2.RateLimitInfo + * @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 */ - RateLimitInfo.verify = function verify(message) { + SampleRowKeysResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.period != null && message.hasOwnProperty("period")) { - var error = $root.google.protobuf.Duration.verify(message.period); - if (error) - return "period." + error; - } - if (message.factor != null && message.hasOwnProperty("factor")) - if (typeof message.factor !== "number") - return "factor: number expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.offsetBytes != null && message.hasOwnProperty("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 RateLimitInfo message from a plain object. Also converts values to their respective internal types. + * Creates a SampleRowKeysResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.RateLimitInfo + * @memberof google.bigtable.v2.SampleRowKeysResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo + * @returns {google.bigtable.v2.SampleRowKeysResponse} SampleRowKeysResponse */ - RateLimitInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.RateLimitInfo) + SampleRowKeysResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.SampleRowKeysResponse) return object; - var message = new $root.google.bigtable.v2.RateLimitInfo(); - if (object.period != null) { - if (typeof object.period !== "object") - throw TypeError(".google.bigtable.v2.RateLimitInfo.period: object expected"); - message.period = $root.google.protobuf.Duration.fromObject(object.period); - } - if (object.factor != null) - message.factor = Number(object.factor); + 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)).unsigned = 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 RateLimitInfo message. Also converts values to other types if specified. + * Creates a plain object from a SampleRowKeysResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.RateLimitInfo + * @memberof google.bigtable.v2.SampleRowKeysResponse * @static - * @param {google.bigtable.v2.RateLimitInfo} message RateLimitInfo + * @param {google.bigtable.v2.SampleRowKeysResponse} message SampleRowKeysResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RateLimitInfo.toObject = function toObject(message, options) { + SampleRowKeysResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.period = null; - object.factor = 0; + 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() : long; + } else + object.offsetBytes = options.longs === String ? "0" : 0; } - if (message.period != null && message.hasOwnProperty("period")) - object.period = $root.google.protobuf.Duration.toObject(message.period, options); - if (message.factor != null && message.hasOwnProperty("factor")) - object.factor = options.json && !isFinite(message.factor) ? String(message.factor) : message.factor; + if (message.rowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("offsetBytes")) + 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 RateLimitInfo to JSON. + * Converts this SampleRowKeysResponse to JSON. * @function toJSON - * @memberof google.bigtable.v2.RateLimitInfo + * @memberof google.bigtable.v2.SampleRowKeysResponse * @instance * @returns {Object.} JSON object */ - RateLimitInfo.prototype.toJSON = function toJSON() { + SampleRowKeysResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RateLimitInfo + * Gets the default type url for SampleRowKeysResponse * @function getTypeUrl - * @memberof google.bigtable.v2.RateLimitInfo + * @memberof google.bigtable.v2.SampleRowKeysResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RateLimitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SampleRowKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.RateLimitInfo"; + return typeUrlPrefix + "/google.bigtable.v2.SampleRowKeysResponse"; }; - return RateLimitInfo; + return SampleRowKeysResponse; })(); - v2.CheckAndMutateRowRequest = (function() { + v2.MutateRowRequest = (function() { /** - * Properties of a CheckAndMutateRowRequest. + * Properties of a MutateRowRequest. * @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 + * @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 */ /** - * Constructs a new CheckAndMutateRowRequest. + * Constructs a new MutateRowRequest. * @memberof google.bigtable.v2 - * @classdesc Represents a CheckAndMutateRowRequest. - * @implements ICheckAndMutateRowRequest + * @classdesc Represents a MutateRowRequest. + * @implements IMutateRowRequest * @constructor - * @param {google.bigtable.v2.ICheckAndMutateRowRequest=} [properties] Properties to set + * @param {google.bigtable.v2.IMutateRowRequest=} [properties] Properties to set */ - function CheckAndMutateRowRequest(properties) { - this.trueMutations = []; - this.falseMutations = []; + function MutateRowRequest(properties) { + this.mutations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36044,132 +37247,111 @@ } /** - * CheckAndMutateRowRequest tableName. + * MutateRowRequest tableName. * @member {string} tableName - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @instance */ - CheckAndMutateRowRequest.prototype.tableName = ""; + MutateRowRequest.prototype.tableName = ""; /** - * CheckAndMutateRowRequest authorizedViewName. + * MutateRowRequest authorizedViewName. * @member {string} authorizedViewName - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @instance */ - CheckAndMutateRowRequest.prototype.authorizedViewName = ""; + MutateRowRequest.prototype.authorizedViewName = ""; /** - * CheckAndMutateRowRequest appProfileId. + * MutateRowRequest appProfileId. * @member {string} appProfileId - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @instance */ - CheckAndMutateRowRequest.prototype.appProfileId = ""; + MutateRowRequest.prototype.appProfileId = ""; /** - * CheckAndMutateRowRequest rowKey. + * MutateRowRequest 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 + * @memberof google.bigtable.v2.MutateRowRequest * @instance */ - CheckAndMutateRowRequest.prototype.trueMutations = $util.emptyArray; + MutateRowRequest.prototype.rowKey = $util.newBuffer([]); /** - * CheckAndMutateRowRequest falseMutations. - * @member {Array.} falseMutations - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * MutateRowRequest mutations. + * @member {Array.} mutations + * @memberof google.bigtable.v2.MutateRowRequest * @instance */ - CheckAndMutateRowRequest.prototype.falseMutations = $util.emptyArray; + MutateRowRequest.prototype.mutations = $util.emptyArray; /** - * Creates a new CheckAndMutateRowRequest instance using the specified properties. + * Creates a new MutateRowRequest instance using the specified properties. * @function create - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @static - * @param {google.bigtable.v2.ICheckAndMutateRowRequest=} [properties] Properties to set - * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest instance + * @param {google.bigtable.v2.IMutateRowRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowRequest} MutateRowRequest instance */ - CheckAndMutateRowRequest.create = function create(properties) { - return new CheckAndMutateRowRequest(properties); + MutateRowRequest.create = function create(properties) { + return new MutateRowRequest(properties); }; /** - * Encodes the specified CheckAndMutateRowRequest message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. + * Encodes the specified MutateRowRequest message. Does not implicitly {@link google.bigtable.v2.MutateRowRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @static - * @param {google.bigtable.v2.ICheckAndMutateRowRequest} message CheckAndMutateRowRequest message or plain object to encode + * @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 */ - CheckAndMutateRowRequest.encode = function encode(message, writer) { + MutateRowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); - if (message.trueMutations != null && message.trueMutations.length) - for (var i = 0; i < message.trueMutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.trueMutations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.falseMutations != null && message.falseMutations.length) - for (var i = 0; i < message.falseMutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.falseMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) - $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.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()).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.appProfileId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.appProfileId); if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.authorizedViewName); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.authorizedViewName); return writer; }; /** - * Encodes the specified CheckAndMutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. + * Encodes the specified MutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @static - * @param {google.bigtable.v2.ICheckAndMutateRowRequest} message CheckAndMutateRowRequest message or plain object to encode + * @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 */ - CheckAndMutateRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + MutateRowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer. + * Decodes a MutateRowRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @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.CheckAndMutateRowRequest} CheckAndMutateRowRequest + * @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 */ - CheckAndMutateRowRequest.decode = function decode(reader, length) { + MutateRowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -36177,11 +37359,11 @@ message.tableName = reader.string(); break; } - case 9: { + case 6: { message.authorizedViewName = reader.string(); break; } - case 7: { + case 4: { message.appProfileId = reader.string(); break; } @@ -36189,20 +37371,10 @@ message.rowKey = reader.bytes(); break; } - case 6: { - message.predicateFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.trueMutations && message.trueMutations.length)) - message.trueMutations = []; - message.trueMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.falseMutations && message.falseMutations.length)) - message.falseMutations = []; - message.falseMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); + case 3: { + if (!(message.mutations && message.mutations.length)) + message.mutations = []; + message.mutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); break; } default: @@ -36214,30 +37386,30 @@ }; /** - * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer, length delimited. + * Decodes a MutateRowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest + * @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 */ - CheckAndMutateRowRequest.decodeDelimited = function decodeDelimited(reader) { + MutateRowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CheckAndMutateRowRequest message. + * Verifies a MutateRowRequest message. * @function verify - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @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 */ - CheckAndMutateRowRequest.verify = function verify(message) { + MutateRowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.tableName != null && message.hasOwnProperty("tableName")) @@ -36252,44 +37424,30 @@ if (message.rowKey != null && message.hasOwnProperty("rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter); - if (error) - return "predicateFilter." + error; - } - if (message.trueMutations != null && message.hasOwnProperty("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]); - if (error) - return "trueMutations." + error; - } - } - if (message.falseMutations != null && message.hasOwnProperty("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]); - if (error) - return "falseMutations." + error; - } + if (message.mutations != null && message.hasOwnProperty("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]); + if (error) + return "mutations." + error; + } } return null; }; /** - * Creates a CheckAndMutateRowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MutateRowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest + * @returns {google.bigtable.v2.MutateRowRequest} MutateRowRequest */ - CheckAndMutateRowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowRequest) + MutateRowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.MutateRowRequest) return object; - var message = new $root.google.bigtable.v2.CheckAndMutateRowRequest(); + var message = new $root.google.bigtable.v2.MutateRowRequest(); if (object.tableName != null) message.tableName = String(object.tableName); if (object.authorizedViewName != null) @@ -36301,51 +37459,34 @@ $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 (typeof object.predicateFilter !== "object") - throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.predicateFilter: object expected"); - message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter); - } - 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 (typeof object.trueMutations[i] !== "object") - throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.trueMutations: object expected"); - message.trueMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.trueMutations[i]); - } - } - 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 (typeof object.falseMutations[i] !== "object") - throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.falseMutations: object expected"); - message.falseMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.falseMutations[i]); + 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 (typeof object.mutations[i] !== "object") + throw TypeError(".google.bigtable.v2.MutateRowRequest.mutations: object expected"); + message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i]); } } return message; }; /** - * Creates a plain object from a CheckAndMutateRowRequest message. Also converts values to other types if specified. + * Creates a plain object from a MutateRowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @static - * @param {google.bigtable.v2.CheckAndMutateRowRequest} message CheckAndMutateRowRequest + * @param {google.bigtable.v2.MutateRowRequest} message MutateRowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CheckAndMutateRowRequest.toObject = function toObject(message, options) { + MutateRowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.trueMutations = []; - object.falseMutations = []; - } + if (options.arrays || options.defaults) + object.mutations = []; if (options.defaults) { object.tableName = ""; if (options.bytes === String) @@ -36355,7 +37496,6 @@ if (options.bytes !== Array) object.rowKey = $util.newBuffer(object.rowKey); } - object.predicateFilter = null; object.appProfileId = ""; object.authorizedViewName = ""; } @@ -36363,18 +37503,11 @@ object.tableName = message.tableName; if (message.rowKey != null && message.hasOwnProperty("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); - } - 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); + 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); } - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) - object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) @@ -36383,52 +37516,51 @@ }; /** - * Converts this CheckAndMutateRowRequest to JSON. + * Converts this MutateRowRequest to JSON. * @function toJSON - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @instance * @returns {Object.} JSON object */ - CheckAndMutateRowRequest.prototype.toJSON = function toJSON() { + MutateRowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CheckAndMutateRowRequest + * Gets the default type url for MutateRowRequest * @function getTypeUrl - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.MutateRowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CheckAndMutateRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MutateRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.CheckAndMutateRowRequest"; + return typeUrlPrefix + "/google.bigtable.v2.MutateRowRequest"; }; - return CheckAndMutateRowRequest; + return MutateRowRequest; })(); - v2.CheckAndMutateRowResponse = (function() { + v2.MutateRowResponse = (function() { /** - * Properties of a CheckAndMutateRowResponse. + * Properties of a MutateRowResponse. * @memberof google.bigtable.v2 - * @interface ICheckAndMutateRowResponse - * @property {boolean|null} [predicateMatched] CheckAndMutateRowResponse predicateMatched + * @interface IMutateRowResponse */ /** - * Constructs a new CheckAndMutateRowResponse. + * Constructs a new MutateRowResponse. * @memberof google.bigtable.v2 - * @classdesc Represents a CheckAndMutateRowResponse. - * @implements ICheckAndMutateRowResponse + * @classdesc Represents a MutateRowResponse. + * @implements IMutateRowResponse * @constructor - * @param {google.bigtable.v2.ICheckAndMutateRowResponse=} [properties] Properties to set + * @param {google.bigtable.v2.IMutateRowResponse=} [properties] Properties to set */ - function CheckAndMutateRowResponse(properties) { + function MutateRowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36436,77 +37568,63 @@ } /** - * CheckAndMutateRowResponse predicateMatched. - * @member {boolean} predicateMatched - * @memberof google.bigtable.v2.CheckAndMutateRowResponse - * @instance - */ - CheckAndMutateRowResponse.prototype.predicateMatched = false; - - /** - * Creates a new CheckAndMutateRowResponse instance using the specified properties. + * Creates a new MutateRowResponse instance using the specified properties. * @function create - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @memberof google.bigtable.v2.MutateRowResponse * @static - * @param {google.bigtable.v2.ICheckAndMutateRowResponse=} [properties] Properties to set - * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse instance + * @param {google.bigtable.v2.IMutateRowResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse instance */ - CheckAndMutateRowResponse.create = function create(properties) { - return new CheckAndMutateRowResponse(properties); + MutateRowResponse.create = function create(properties) { + return new MutateRowResponse(properties); }; /** - * Encodes the specified CheckAndMutateRowResponse message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowResponse.verify|verify} messages. + * Encodes the specified MutateRowResponse message. Does not implicitly {@link google.bigtable.v2.MutateRowResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @memberof google.bigtable.v2.MutateRowResponse * @static - * @param {google.bigtable.v2.ICheckAndMutateRowResponse} message CheckAndMutateRowResponse message or plain object to encode + * @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 */ - CheckAndMutateRowResponse.encode = function encode(message, writer) { + MutateRowResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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. + * Encodes the specified MutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @memberof google.bigtable.v2.MutateRowResponse * @static - * @param {google.bigtable.v2.ICheckAndMutateRowResponse} message CheckAndMutateRowResponse message or plain object to encode + * @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 */ - CheckAndMutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { + MutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer. + * Decodes a MutateRowResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @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.CheckAndMutateRowResponse} CheckAndMutateRowResponse + * @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 */ - CheckAndMutateRowResponse.decode = function decode(reader, length) { + MutateRowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.predicateMatched = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -36516,123 +37634,113 @@ }; /** - * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer, length delimited. + * Decodes a MutateRowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @memberof google.bigtable.v2.MutateRowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse + * @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 */ - CheckAndMutateRowResponse.decodeDelimited = function decodeDelimited(reader) { + MutateRowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CheckAndMutateRowResponse message. + * Verifies a MutateRowResponse message. * @function verify - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @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 */ - CheckAndMutateRowResponse.verify = function verify(message) { + MutateRowResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.predicateMatched != null && message.hasOwnProperty("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. + * Creates a MutateRowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @memberof google.bigtable.v2.MutateRowResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse + * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse */ - CheckAndMutateRowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowResponse) + MutateRowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.MutateRowResponse) return object; - var message = new $root.google.bigtable.v2.CheckAndMutateRowResponse(); - if (object.predicateMatched != null) - message.predicateMatched = Boolean(object.predicateMatched); - return message; + return new $root.google.bigtable.v2.MutateRowResponse(); }; /** - * Creates a plain object from a CheckAndMutateRowResponse message. Also converts values to other types if specified. + * Creates a plain object from a MutateRowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @memberof google.bigtable.v2.MutateRowResponse * @static - * @param {google.bigtable.v2.CheckAndMutateRowResponse} message CheckAndMutateRowResponse + * @param {google.bigtable.v2.MutateRowResponse} message MutateRowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CheckAndMutateRowResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.predicateMatched = false; - if (message.predicateMatched != null && message.hasOwnProperty("predicateMatched")) - object.predicateMatched = message.predicateMatched; - return object; + MutateRowResponse.toObject = function toObject() { + return {}; }; /** - * Converts this CheckAndMutateRowResponse to JSON. + * Converts this MutateRowResponse to JSON. * @function toJSON - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @memberof google.bigtable.v2.MutateRowResponse * @instance * @returns {Object.} JSON object */ - CheckAndMutateRowResponse.prototype.toJSON = function toJSON() { + MutateRowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CheckAndMutateRowResponse + * Gets the default type url for MutateRowResponse * @function getTypeUrl - * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @memberof google.bigtable.v2.MutateRowResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CheckAndMutateRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MutateRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.CheckAndMutateRowResponse"; + return typeUrlPrefix + "/google.bigtable.v2.MutateRowResponse"; }; - return CheckAndMutateRowResponse; + return MutateRowResponse; })(); - v2.PingAndWarmRequest = (function() { + v2.MutateRowsRequest = (function() { /** - * Properties of a PingAndWarmRequest. + * Properties of a MutateRowsRequest. * @memberof google.bigtable.v2 - * @interface IPingAndWarmRequest - * @property {string|null} [name] PingAndWarmRequest name - * @property {string|null} [appProfileId] PingAndWarmRequest appProfileId + * @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 PingAndWarmRequest. + * Constructs a new MutateRowsRequest. * @memberof google.bigtable.v2 - * @classdesc Represents a PingAndWarmRequest. - * @implements IPingAndWarmRequest + * @classdesc Represents a MutateRowsRequest. + * @implements IMutateRowsRequest * @constructor - * @param {google.bigtable.v2.IPingAndWarmRequest=} [properties] Properties to set + * @param {google.bigtable.v2.IMutateRowsRequest=} [properties] Properties to set */ - function PingAndWarmRequest(properties) { + function MutateRowsRequest(properties) { + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36640,91 +37748,122 @@ } /** - * PingAndWarmRequest name. - * @member {string} name - * @memberof google.bigtable.v2.PingAndWarmRequest + * MutateRowsRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.MutateRowsRequest * @instance */ - PingAndWarmRequest.prototype.name = ""; + MutateRowsRequest.prototype.tableName = ""; /** - * PingAndWarmRequest appProfileId. + * MutateRowsRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.MutateRowsRequest + * @instance + */ + MutateRowsRequest.prototype.authorizedViewName = ""; + + /** + * MutateRowsRequest appProfileId. * @member {string} appProfileId - * @memberof google.bigtable.v2.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @instance */ - PingAndWarmRequest.prototype.appProfileId = ""; + MutateRowsRequest.prototype.appProfileId = ""; /** - * Creates a new PingAndWarmRequest instance using the specified properties. + * 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.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @static - * @param {google.bigtable.v2.IPingAndWarmRequest=} [properties] Properties to set - * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest instance + * @param {google.bigtable.v2.IMutateRowsRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowsRequest} MutateRowsRequest instance */ - PingAndWarmRequest.create = function create(properties) { - return new PingAndWarmRequest(properties); + MutateRowsRequest.create = function create(properties) { + return new MutateRowsRequest(properties); }; /** - * Encodes the specified PingAndWarmRequest message. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * Encodes the specified MutateRowsRequest message. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @static - * @param {google.bigtable.v2.IPingAndWarmRequest} message PingAndWarmRequest message or plain object to encode + * @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 */ - PingAndWarmRequest.encode = function encode(message, writer) { + MutateRowsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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()).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(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 PingAndWarmRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * Encodes the specified MutateRowsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @static - * @param {google.bigtable.v2.IPingAndWarmRequest} message PingAndWarmRequest message or plain object to encode + * @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 */ - PingAndWarmRequest.encodeDelimited = function encodeDelimited(message, writer) { + MutateRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PingAndWarmRequest message from the specified reader or buffer. + * Decodes a MutateRowsRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.PingAndWarmRequest + * @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.PingAndWarmRequest} PingAndWarmRequest + * @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 */ - PingAndWarmRequest.decode = function decode(reader, length) { + MutateRowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.tableName = reader.string(); break; } - case 2: { + 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())); + break; + } default: reader.skipType(tag & 7); break; @@ -36734,311 +37873,424 @@ }; /** - * Decodes a PingAndWarmRequest message from the specified reader or buffer, length delimited. + * Decodes a MutateRowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest + * @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 */ - PingAndWarmRequest.decodeDelimited = function decodeDelimited(reader) { + MutateRowsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PingAndWarmRequest message. + * Verifies a MutateRowsRequest message. * @function verify - * @memberof google.bigtable.v2.PingAndWarmRequest + * @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 */ - PingAndWarmRequest.verify = function verify(message) { + MutateRowsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; + if (message.entries != null && message.hasOwnProperty("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]); + if (error) + return "entries." + error; + } + } return null; }; /** - * Creates a PingAndWarmRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MutateRowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest + * @returns {google.bigtable.v2.MutateRowsRequest} MutateRowsRequest */ - PingAndWarmRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.PingAndWarmRequest) + MutateRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.MutateRowsRequest) return object; - var message = new $root.google.bigtable.v2.PingAndWarmRequest(); - if (object.name != null) - message.name = String(object.name); + 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 (typeof object.entries[i] !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsRequest.entries: object expected"); + message.entries[i] = $root.google.bigtable.v2.MutateRowsRequest.Entry.fromObject(object.entries[i]); + } + } return message; }; /** - * Creates a plain object from a PingAndWarmRequest message. Also converts values to other types if specified. + * Creates a plain object from a MutateRowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @static - * @param {google.bigtable.v2.PingAndWarmRequest} message PingAndWarmRequest + * @param {google.bigtable.v2.MutateRowsRequest} message MutateRowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PingAndWarmRequest.toObject = function toObject(message, options) { + MutateRowsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entries = []; if (options.defaults) { - object.name = ""; + object.tableName = ""; object.appProfileId = ""; + object.authorizedViewName = ""; + } + if (message.tableName != null && message.hasOwnProperty("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); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; /** - * Converts this PingAndWarmRequest to JSON. + * Converts this MutateRowsRequest to JSON. * @function toJSON - * @memberof google.bigtable.v2.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @instance * @returns {Object.} JSON object */ - PingAndWarmRequest.prototype.toJSON = function toJSON() { + MutateRowsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PingAndWarmRequest + * Gets the default type url for MutateRowsRequest * @function getTypeUrl - * @memberof google.bigtable.v2.PingAndWarmRequest + * @memberof google.bigtable.v2.MutateRowsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PingAndWarmRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MutateRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.PingAndWarmRequest"; + return typeUrlPrefix + "/google.bigtable.v2.MutateRowsRequest"; }; - return PingAndWarmRequest; - })(); + MutateRowsRequest.Entry = (function() { - v2.PingAndWarmResponse = (function() { + /** + * Properties of an Entry. + * @memberof google.bigtable.v2.MutateRowsRequest + * @interface IEntry + * @property {Uint8Array|null} [rowKey] Entry rowKey + * @property {Array.|null} [mutations] Entry mutations + */ - /** - * Properties of a PingAndWarmResponse. - * @memberof google.bigtable.v2 - * @interface IPingAndWarmResponse - */ + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * Entry rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @instance + */ + Entry.prototype.rowKey = $util.newBuffer([]); - /** - * 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); - }; + /** + * Entry mutations. + * @member {Array.} mutations + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @instance + */ + Entry.prototype.mutations = $util.emptyArray; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * 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 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).ldelim(); - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + return writer; + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + /** + * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + 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()); - }; + /** + * 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 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.mutations != null && message.hasOwnProperty("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]); + if (error) + return "mutations." + error; + } + } + 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) { - if (object instanceof $root.google.bigtable.v2.PingAndWarmResponse) + /** + * 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) { + if (object instanceof $root.google.bigtable.v2.MutateRowsRequest.Entry) + return object; + 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 (typeof object.mutations[i] !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.mutations: object expected"); + message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + if (message.rowKey != null && message.hasOwnProperty("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); + } 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 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); + }; - /** - * 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 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"; + }; - /** - * 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 Entry; + })(); - return PingAndWarmResponse; + return MutateRowsRequest; })(); - v2.ReadModifyWriteRowRequest = (function() { + v2.MutateRowsResponse = (function() { /** - * Properties of a ReadModifyWriteRowRequest. + * Properties of a MutateRowsResponse. * @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 + * @interface IMutateRowsResponse + * @property {Array.|null} [entries] MutateRowsResponse entries + * @property {google.bigtable.v2.IRateLimitInfo|null} [rateLimitInfo] MutateRowsResponse rateLimitInfo */ /** - * Constructs a new ReadModifyWriteRowRequest. + * Constructs a new MutateRowsResponse. * @memberof google.bigtable.v2 - * @classdesc Represents a ReadModifyWriteRowRequest. - * @implements IReadModifyWriteRowRequest + * @classdesc Represents a MutateRowsResponse. + * @implements IMutateRowsResponse * @constructor - * @param {google.bigtable.v2.IReadModifyWriteRowRequest=} [properties] Properties to set + * @param {google.bigtable.v2.IMutateRowsResponse=} [properties] Properties to set */ - function ReadModifyWriteRowRequest(properties) { - this.rules = []; + function MutateRowsResponse(properties) { + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37046,134 +38298,101 @@ } /** - * ReadModifyWriteRowRequest tableName. - * @member {string} tableName - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest - * @instance - */ - ReadModifyWriteRowRequest.prototype.tableName = ""; - - /** - * ReadModifyWriteRowRequest authorizedViewName. - * @member {string} authorizedViewName - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * MutateRowsResponse entries. + * @member {Array.} entries + * @memberof google.bigtable.v2.MutateRowsResponse * @instance */ - ReadModifyWriteRowRequest.prototype.authorizedViewName = ""; + MutateRowsResponse.prototype.entries = $util.emptyArray; /** - * ReadModifyWriteRowRequest appProfileId. - * @member {string} appProfileId - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * MutateRowsResponse rateLimitInfo. + * @member {google.bigtable.v2.IRateLimitInfo|null|undefined} rateLimitInfo + * @memberof google.bigtable.v2.MutateRowsResponse * @instance */ - ReadModifyWriteRowRequest.prototype.appProfileId = ""; + MutateRowsResponse.prototype.rateLimitInfo = null; - /** - * ReadModifyWriteRowRequest rowKey. - * @member {Uint8Array} rowKey - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest - * @instance - */ - ReadModifyWriteRowRequest.prototype.rowKey = $util.newBuffer([]); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * ReadModifyWriteRowRequest rules. - * @member {Array.} rules - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest - * @instance - */ - ReadModifyWriteRowRequest.prototype.rules = $util.emptyArray; + // Virtual OneOf for proto3 optional field + Object.defineProperty(MutateRowsResponse.prototype, "_rateLimitInfo", { + get: $util.oneOfGetter($oneOfFields = ["rateLimitInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ReadModifyWriteRowRequest instance using the specified properties. + * Creates a new MutateRowsResponse instance using the specified properties. * @function create - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @memberof google.bigtable.v2.MutateRowsResponse * @static - * @param {google.bigtable.v2.IReadModifyWriteRowRequest=} [properties] Properties to set - * @returns {google.bigtable.v2.ReadModifyWriteRowRequest} ReadModifyWriteRowRequest instance + * @param {google.bigtable.v2.IMutateRowsResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse instance */ - ReadModifyWriteRowRequest.create = function create(properties) { - return new ReadModifyWriteRowRequest(properties); + MutateRowsResponse.create = function create(properties) { + return new MutateRowsResponse(properties); }; /** - * Encodes the specified ReadModifyWriteRowRequest message. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowRequest.verify|verify} messages. + * Encodes the specified MutateRowsResponse message. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @memberof google.bigtable.v2.MutateRowsResponse * @static - * @param {google.bigtable.v2.IReadModifyWriteRowRequest} message ReadModifyWriteRowRequest message or plain object to encode + * @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 */ - ReadModifyWriteRowRequest.encode = function encode(message, writer) { + MutateRowsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); - if (message.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()).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.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.bigtable.v2.MutateRowsResponse.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) + $root.google.bigtable.v2.RateLimitInfo.encode(message.rateLimitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReadModifyWriteRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowRequest.verify|verify} messages. + * Encodes the specified MutateRowsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @memberof google.bigtable.v2.MutateRowsResponse * @static - * @param {google.bigtable.v2.IReadModifyWriteRowRequest} message ReadModifyWriteRowRequest message or plain object to encode + * @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 */ - ReadModifyWriteRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + MutateRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReadModifyWriteRowRequest message from the specified reader or buffer. + * Decodes a MutateRowsResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @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.ReadModifyWriteRowRequest} ReadModifyWriteRowRequest + * @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 */ - ReadModifyWriteRowRequest.decode = function decode(reader, length) { + MutateRowsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsResponse(); while (reader.pos < end) { var tag = reader.uint32(); 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(); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.bigtable.v2.MutateRowsResponse.Entry.decode(reader, reader.uint32())); break; } case 3: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.bigtable.v2.ReadModifyWriteRule.decode(reader, reader.uint32())); + message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.decode(reader, reader.uint32()); break; } default: @@ -37185,182 +38404,405 @@ }; /** - * Decodes a ReadModifyWriteRowRequest message from the specified reader or buffer, length delimited. + * Decodes a MutateRowsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @memberof google.bigtable.v2.MutateRowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.ReadModifyWriteRowRequest} ReadModifyWriteRowRequest + * @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 */ - ReadModifyWriteRowRequest.decodeDelimited = function decodeDelimited(reader) { + MutateRowsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReadModifyWriteRowRequest message. + * Verifies a MutateRowsResponse message. * @function verify - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @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 */ - ReadModifyWriteRowRequest.verify = function verify(message) { + MutateRowsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - if (!$util.isString(message.authorizedViewName)) - return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.bigtable.v2.ReadModifyWriteRule.verify(message.rules[i]); + var properties = {}; + if (message.entries != null && message.hasOwnProperty("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]); if (error) - return "rules." + error; + return "entries." + error; + } + } + if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { + properties._rateLimitInfo = 1; + { + var error = $root.google.bigtable.v2.RateLimitInfo.verify(message.rateLimitInfo); + if (error) + return "rateLimitInfo." + error; } } return null; }; /** - * Creates a ReadModifyWriteRowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MutateRowsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @memberof google.bigtable.v2.MutateRowsResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.ReadModifyWriteRowRequest} ReadModifyWriteRowRequest + * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse */ - ReadModifyWriteRowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowRequest) + MutateRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.MutateRowsResponse) return object; - 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 (typeof object.rules[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest.rules: object expected"); - message.rules[i] = $root.google.bigtable.v2.ReadModifyWriteRule.fromObject(object.rules[i]); + 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 (typeof object.entries[i] !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsResponse.entries: object expected"); + message.entries[i] = $root.google.bigtable.v2.MutateRowsResponse.Entry.fromObject(object.entries[i]); } } + if (object.rateLimitInfo != null) { + if (typeof object.rateLimitInfo !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsResponse.rateLimitInfo: object expected"); + message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.fromObject(object.rateLimitInfo); + } return message; }; /** - * Creates a plain object from a ReadModifyWriteRowRequest message. Also converts values to other types if specified. + * Creates a plain object from a MutateRowsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @memberof google.bigtable.v2.MutateRowsResponse * @static - * @param {google.bigtable.v2.ReadModifyWriteRowRequest} message ReadModifyWriteRowRequest + * @param {google.bigtable.v2.MutateRowsResponse} message MutateRowsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadModifyWriteRowRequest.toObject = function toObject(message, options) { + MutateRowsResponse.toObject = function toObject(message, options) { if (!options) options = {}; 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 = ""; + 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); } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.rowKey != null && message.hasOwnProperty("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); + if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { + object.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.toObject(message.rateLimitInfo, options); + if (options.oneofs) + object._rateLimitInfo = "rateLimitInfo"; } - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) - object.authorizedViewName = message.authorizedViewName; return object; }; /** - * Converts this ReadModifyWriteRowRequest to JSON. + * Converts this MutateRowsResponse to JSON. * @function toJSON - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @memberof google.bigtable.v2.MutateRowsResponse * @instance * @returns {Object.} JSON object */ - ReadModifyWriteRowRequest.prototype.toJSON = function toJSON() { + MutateRowsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReadModifyWriteRowRequest + * Gets the default type url for MutateRowsResponse * @function getTypeUrl - * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @memberof google.bigtable.v2.MutateRowsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReadModifyWriteRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MutateRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.ReadModifyWriteRowRequest"; + return typeUrlPrefix + "/google.bigtable.v2.MutateRowsResponse"; }; - return ReadModifyWriteRowRequest; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.index = reader.int64(); + break; + } + case 2: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("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 && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + 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) { + if (object instanceof $root.google.bigtable.v2.MutateRowsResponse.Entry) + return object; + var message = new $root.google.bigtable.v2.MutateRowsResponse.Entry(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = 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 (typeof object.status !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsResponse.Entry.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + 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) { + if (!options) + options = {}; + 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() : long; + } else + object.index = options.longs === String ? "0" : 0; + object.status = null; + } + if (message.index != null && message.hasOwnProperty("index")) + 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 && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + 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.ReadModifyWriteRowResponse = (function() { + v2.RateLimitInfo = (function() { /** - * Properties of a ReadModifyWriteRowResponse. + * Properties of a RateLimitInfo. * @memberof google.bigtable.v2 - * @interface IReadModifyWriteRowResponse - * @property {google.bigtable.v2.IRow|null} [row] ReadModifyWriteRowResponse row + * @interface IRateLimitInfo + * @property {google.protobuf.IDuration|null} [period] RateLimitInfo period + * @property {number|null} [factor] RateLimitInfo factor */ /** - * Constructs a new ReadModifyWriteRowResponse. + * Constructs a new RateLimitInfo. * @memberof google.bigtable.v2 - * @classdesc Represents a ReadModifyWriteRowResponse. - * @implements IReadModifyWriteRowResponse + * @classdesc Represents a RateLimitInfo. + * @implements IRateLimitInfo * @constructor - * @param {google.bigtable.v2.IReadModifyWriteRowResponse=} [properties] Properties to set + * @param {google.bigtable.v2.IRateLimitInfo=} [properties] Properties to set */ - function ReadModifyWriteRowResponse(properties) { + function RateLimitInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37368,75 +38810,89 @@ } /** - * ReadModifyWriteRowResponse row. - * @member {google.bigtable.v2.IRow|null|undefined} row - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * RateLimitInfo period. + * @member {google.protobuf.IDuration|null|undefined} period + * @memberof google.bigtable.v2.RateLimitInfo * @instance */ - ReadModifyWriteRowResponse.prototype.row = null; + RateLimitInfo.prototype.period = null; /** - * Creates a new ReadModifyWriteRowResponse instance using the specified properties. + * 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.ReadModifyWriteRowResponse + * @memberof google.bigtable.v2.RateLimitInfo * @static - * @param {google.bigtable.v2.IReadModifyWriteRowResponse=} [properties] Properties to set - * @returns {google.bigtable.v2.ReadModifyWriteRowResponse} ReadModifyWriteRowResponse instance + * @param {google.bigtable.v2.IRateLimitInfo=} [properties] Properties to set + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo instance */ - ReadModifyWriteRowResponse.create = function create(properties) { - return new ReadModifyWriteRowResponse(properties); + RateLimitInfo.create = function create(properties) { + return new RateLimitInfo(properties); }; /** - * Encodes the specified ReadModifyWriteRowResponse message. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowResponse.verify|verify} messages. + * Encodes the specified RateLimitInfo message. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @memberof google.bigtable.v2.RateLimitInfo * @static - * @param {google.bigtable.v2.IReadModifyWriteRowResponse} message ReadModifyWriteRowResponse message or plain object to encode + * @param {google.bigtable.v2.IRateLimitInfo} message RateLimitInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadModifyWriteRowResponse.encode = function encode(message, writer) { + RateLimitInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).ldelim(); + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.factor != null && Object.hasOwnProperty.call(message, "factor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.factor); return writer; }; /** - * Encodes the specified ReadModifyWriteRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowResponse.verify|verify} messages. + * Encodes the specified RateLimitInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @memberof google.bigtable.v2.RateLimitInfo * @static - * @param {google.bigtable.v2.IReadModifyWriteRowResponse} message ReadModifyWriteRowResponse message or plain object to encode + * @param {google.bigtable.v2.IRateLimitInfo} message RateLimitInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadModifyWriteRowResponse.encodeDelimited = function encodeDelimited(message, writer) { + RateLimitInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReadModifyWriteRowResponse message from the specified reader or buffer. + * Decodes a RateLimitInfo message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @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.ReadModifyWriteRowResponse} ReadModifyWriteRowResponse + * @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 */ - ReadModifyWriteRowResponse.decode = function decode(reader, length) { + RateLimitInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RateLimitInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.row = $root.google.bigtable.v2.Row.decode(reader, reader.uint32()); + message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.factor = reader.double(); break; } default: @@ -37448,128 +38904,144 @@ }; /** - * Decodes a ReadModifyWriteRowResponse message from the specified reader or buffer, length delimited. + * Decodes a RateLimitInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @memberof google.bigtable.v2.RateLimitInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.ReadModifyWriteRowResponse} ReadModifyWriteRowResponse + * @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 */ - ReadModifyWriteRowResponse.decodeDelimited = function decodeDelimited(reader) { + RateLimitInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReadModifyWriteRowResponse message. + * Verifies a RateLimitInfo message. * @function verify - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @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 */ - ReadModifyWriteRowResponse.verify = function verify(message) { + RateLimitInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.row != null && message.hasOwnProperty("row")) { - var error = $root.google.bigtable.v2.Row.verify(message.row); + if (message.period != null && message.hasOwnProperty("period")) { + var error = $root.google.protobuf.Duration.verify(message.period); if (error) - return "row." + error; + return "period." + error; } + if (message.factor != null && message.hasOwnProperty("factor")) + if (typeof message.factor !== "number") + return "factor: number expected"; return null; }; /** - * Creates a ReadModifyWriteRowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RateLimitInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @memberof google.bigtable.v2.RateLimitInfo * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.ReadModifyWriteRowResponse} ReadModifyWriteRowResponse + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo */ - ReadModifyWriteRowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowResponse) + RateLimitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.RateLimitInfo) return object; - var message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); - if (object.row != null) { - if (typeof object.row !== "object") - throw TypeError(".google.bigtable.v2.ReadModifyWriteRowResponse.row: object expected"); - message.row = $root.google.bigtable.v2.Row.fromObject(object.row); + var message = new $root.google.bigtable.v2.RateLimitInfo(); + if (object.period != null) { + if (typeof object.period !== "object") + throw TypeError(".google.bigtable.v2.RateLimitInfo.period: object expected"); + message.period = $root.google.protobuf.Duration.fromObject(object.period); } + if (object.factor != null) + message.factor = Number(object.factor); return message; }; /** - * Creates a plain object from a ReadModifyWriteRowResponse message. Also converts values to other types if specified. + * Creates a plain object from a RateLimitInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @memberof google.bigtable.v2.RateLimitInfo * @static - * @param {google.bigtable.v2.ReadModifyWriteRowResponse} message ReadModifyWriteRowResponse + * @param {google.bigtable.v2.RateLimitInfo} message RateLimitInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadModifyWriteRowResponse.toObject = function toObject(message, options) { + RateLimitInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.row = null; - if (message.row != null && message.hasOwnProperty("row")) - object.row = $root.google.bigtable.v2.Row.toObject(message.row, options); - return object; - }; + if (options.defaults) { + object.period = null; + object.factor = 0; + } + if (message.period != null && message.hasOwnProperty("period")) + object.period = $root.google.protobuf.Duration.toObject(message.period, options); + if (message.factor != null && message.hasOwnProperty("factor")) + object.factor = options.json && !isFinite(message.factor) ? String(message.factor) : message.factor; + return object; + }; /** - * Converts this ReadModifyWriteRowResponse to JSON. + * Converts this RateLimitInfo to JSON. * @function toJSON - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @memberof google.bigtable.v2.RateLimitInfo * @instance * @returns {Object.} JSON object */ - ReadModifyWriteRowResponse.prototype.toJSON = function toJSON() { + RateLimitInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReadModifyWriteRowResponse + * Gets the default type url for RateLimitInfo * @function getTypeUrl - * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @memberof google.bigtable.v2.RateLimitInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReadModifyWriteRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RateLimitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.ReadModifyWriteRowResponse"; + return typeUrlPrefix + "/google.bigtable.v2.RateLimitInfo"; }; - return ReadModifyWriteRowResponse; + return RateLimitInfo; })(); - v2.GenerateInitialChangeStreamPartitionsRequest = (function() { + v2.CheckAndMutateRowRequest = (function() { /** - * Properties of a GenerateInitialChangeStreamPartitionsRequest. + * Properties of a CheckAndMutateRowRequest. * @memberof google.bigtable.v2 - * @interface IGenerateInitialChangeStreamPartitionsRequest - * @property {string|null} [tableName] GenerateInitialChangeStreamPartitionsRequest tableName - * @property {string|null} [appProfileId] GenerateInitialChangeStreamPartitionsRequest appProfileId + * @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 GenerateInitialChangeStreamPartitionsRequest. + * Constructs a new CheckAndMutateRowRequest. * @memberof google.bigtable.v2 - * @classdesc Represents a GenerateInitialChangeStreamPartitionsRequest. - * @implements IGenerateInitialChangeStreamPartitionsRequest + * @classdesc Represents a CheckAndMutateRowRequest. + * @implements ICheckAndMutateRowRequest * @constructor - * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest=} [properties] Properties to set + * @param {google.bigtable.v2.ICheckAndMutateRowRequest=} [properties] Properties to set */ - function GenerateInitialChangeStreamPartitionsRequest(properties) { + 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) @@ -37577,80 +39049,132 @@ } /** - * GenerateInitialChangeStreamPartitionsRequest tableName. + * CheckAndMutateRowRequest tableName. * @member {string} tableName - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @instance */ - GenerateInitialChangeStreamPartitionsRequest.prototype.tableName = ""; + CheckAndMutateRowRequest.prototype.tableName = ""; /** - * GenerateInitialChangeStreamPartitionsRequest appProfileId. + * CheckAndMutateRowRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.authorizedViewName = ""; + + /** + * CheckAndMutateRowRequest appProfileId. * @member {string} appProfileId - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @instance */ - GenerateInitialChangeStreamPartitionsRequest.prototype.appProfileId = ""; + CheckAndMutateRowRequest.prototype.appProfileId = ""; /** - * Creates a new GenerateInitialChangeStreamPartitionsRequest instance using the specified properties. + * 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.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @static - * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest=} [properties] Properties to set - * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} GenerateInitialChangeStreamPartitionsRequest instance + * @param {google.bigtable.v2.ICheckAndMutateRowRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest instance */ - GenerateInitialChangeStreamPartitionsRequest.create = function create(properties) { - return new GenerateInitialChangeStreamPartitionsRequest(properties); + CheckAndMutateRowRequest.create = function create(properties) { + return new CheckAndMutateRowRequest(properties); }; /** - * Encodes the specified GenerateInitialChangeStreamPartitionsRequest message. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.verify|verify} messages. + * Encodes the specified CheckAndMutateRowRequest message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @static - * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest} message GenerateInitialChangeStreamPartitionsRequest message or plain object to encode + * @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 */ - GenerateInitialChangeStreamPartitionsRequest.encode = function encode(message, writer) { + CheckAndMutateRowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); + if (message.trueMutations != null && message.trueMutations.length) + for (var i = 0; i < message.trueMutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.trueMutations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.falseMutations != null && message.falseMutations.length) + for (var i = 0; i < message.falseMutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.falseMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) + $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(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 GenerateInitialChangeStreamPartitionsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.verify|verify} messages. + * Encodes the specified CheckAndMutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @static - * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest} message GenerateInitialChangeStreamPartitionsRequest message or plain object to encode + * @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 */ - GenerateInitialChangeStreamPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CheckAndMutateRowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerateInitialChangeStreamPartitionsRequest message from the specified reader or buffer. + * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @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.GenerateInitialChangeStreamPartitionsRequest} GenerateInitialChangeStreamPartitionsRequest + * @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 */ - GenerateInitialChangeStreamPartitionsRequest.decode = function decode(reader, length) { + CheckAndMutateRowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -37658,10 +39182,34 @@ message.tableName = reader.string(); break; } - case 2: { + 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()); + break; + } + case 4: { + if (!(message.trueMutations && message.trueMutations.length)) + message.trueMutations = []; + message.trueMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.falseMutations && message.falseMutations.length)) + message.falseMutations = []; + message.falseMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -37671,131 +39219,221 @@ }; /** - * Decodes a GenerateInitialChangeStreamPartitionsRequest message from the specified reader or buffer, length delimited. + * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} GenerateInitialChangeStreamPartitionsRequest + * @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 */ - GenerateInitialChangeStreamPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { + CheckAndMutateRowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GenerateInitialChangeStreamPartitionsRequest message. + * Verifies a CheckAndMutateRowRequest message. * @function verify - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @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 */ - GenerateInitialChangeStreamPartitionsRequest.verify = function verify(message) { + CheckAndMutateRowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.tableName != null && message.hasOwnProperty("tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter); + if (error) + return "predicateFilter." + error; + } + if (message.trueMutations != null && message.hasOwnProperty("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]); + if (error) + return "trueMutations." + error; + } + } + if (message.falseMutations != null && message.hasOwnProperty("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]); + if (error) + return "falseMutations." + error; + } + } return null; }; /** - * Creates a GenerateInitialChangeStreamPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CheckAndMutateRowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} GenerateInitialChangeStreamPartitionsRequest + * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest */ - GenerateInitialChangeStreamPartitionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) + CheckAndMutateRowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowRequest) return object; - var message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(); + 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 (typeof object.predicateFilter !== "object") + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.predicateFilter: object expected"); + message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter); + } + 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 (typeof object.trueMutations[i] !== "object") + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.trueMutations: object expected"); + message.trueMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.trueMutations[i]); + } + } + 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 (typeof object.falseMutations[i] !== "object") + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.falseMutations: object expected"); + message.falseMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.falseMutations[i]); + } + } return message; }; /** - * Creates a plain object from a GenerateInitialChangeStreamPartitionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CheckAndMutateRowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @static - * @param {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} message GenerateInitialChangeStreamPartitionsRequest + * @param {google.bigtable.v2.CheckAndMutateRowRequest} message CheckAndMutateRowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateInitialChangeStreamPartitionsRequest.toObject = function toObject(message, options) { + CheckAndMutateRowRequest.toObject = function toObject(message, options) { if (!options) options = {}; 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 && message.hasOwnProperty("tableName")) object.tableName = message.tableName; + if (message.rowKey != null && message.hasOwnProperty("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); + } + 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); + } + if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) + object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; /** - * Converts this GenerateInitialChangeStreamPartitionsRequest to JSON. + * Converts this CheckAndMutateRowRequest to JSON. * @function toJSON - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @instance * @returns {Object.} JSON object */ - GenerateInitialChangeStreamPartitionsRequest.prototype.toJSON = function toJSON() { + CheckAndMutateRowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GenerateInitialChangeStreamPartitionsRequest + * Gets the default type url for CheckAndMutateRowRequest * @function getTypeUrl - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerateInitialChangeStreamPartitionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CheckAndMutateRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest"; + return typeUrlPrefix + "/google.bigtable.v2.CheckAndMutateRowRequest"; }; - return GenerateInitialChangeStreamPartitionsRequest; + return CheckAndMutateRowRequest; })(); - v2.GenerateInitialChangeStreamPartitionsResponse = (function() { + v2.CheckAndMutateRowResponse = (function() { /** - * Properties of a GenerateInitialChangeStreamPartitionsResponse. + * Properties of a CheckAndMutateRowResponse. * @memberof google.bigtable.v2 - * @interface IGenerateInitialChangeStreamPartitionsResponse - * @property {google.bigtable.v2.IStreamPartition|null} [partition] GenerateInitialChangeStreamPartitionsResponse partition + * @interface ICheckAndMutateRowResponse + * @property {boolean|null} [predicateMatched] CheckAndMutateRowResponse predicateMatched */ /** - * Constructs a new GenerateInitialChangeStreamPartitionsResponse. + * Constructs a new CheckAndMutateRowResponse. * @memberof google.bigtable.v2 - * @classdesc Represents a GenerateInitialChangeStreamPartitionsResponse. - * @implements IGenerateInitialChangeStreamPartitionsResponse + * @classdesc Represents a CheckAndMutateRowResponse. + * @implements ICheckAndMutateRowResponse * @constructor - * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse=} [properties] Properties to set + * @param {google.bigtable.v2.ICheckAndMutateRowResponse=} [properties] Properties to set */ - function GenerateInitialChangeStreamPartitionsResponse(properties) { + function CheckAndMutateRowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37803,75 +39441,75 @@ } /** - * GenerateInitialChangeStreamPartitionsResponse partition. - * @member {google.bigtable.v2.IStreamPartition|null|undefined} partition - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * CheckAndMutateRowResponse predicateMatched. + * @member {boolean} predicateMatched + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @instance */ - GenerateInitialChangeStreamPartitionsResponse.prototype.partition = null; + CheckAndMutateRowResponse.prototype.predicateMatched = false; /** - * Creates a new GenerateInitialChangeStreamPartitionsResponse instance using the specified properties. + * Creates a new CheckAndMutateRowResponse instance using the specified properties. * @function create - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @static - * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse=} [properties] Properties to set - * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} GenerateInitialChangeStreamPartitionsResponse instance + * @param {google.bigtable.v2.ICheckAndMutateRowResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse instance */ - GenerateInitialChangeStreamPartitionsResponse.create = function create(properties) { - return new GenerateInitialChangeStreamPartitionsResponse(properties); + CheckAndMutateRowResponse.create = function create(properties) { + return new CheckAndMutateRowResponse(properties); }; /** - * Encodes the specified GenerateInitialChangeStreamPartitionsResponse message. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.verify|verify} messages. + * Encodes the specified CheckAndMutateRowResponse message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @static - * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse} message GenerateInitialChangeStreamPartitionsResponse message or plain object to encode + * @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 */ - GenerateInitialChangeStreamPartitionsResponse.encode = function encode(message, writer) { + CheckAndMutateRowResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).ldelim(); + if (message.predicateMatched != null && Object.hasOwnProperty.call(message, "predicateMatched")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.predicateMatched); return writer; }; /** - * Encodes the specified GenerateInitialChangeStreamPartitionsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.verify|verify} messages. + * Encodes the specified CheckAndMutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @static - * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse} message GenerateInitialChangeStreamPartitionsResponse message or plain object to encode + * @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 */ - GenerateInitialChangeStreamPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CheckAndMutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerateInitialChangeStreamPartitionsResponse message from the specified reader or buffer. + * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @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.GenerateInitialChangeStreamPartitionsResponse} GenerateInitialChangeStreamPartitionsResponse + * @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 */ - GenerateInitialChangeStreamPartitionsResponse.decode = function decode(reader, length) { + CheckAndMutateRowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); + message.predicateMatched = reader.bool(); break; } default: @@ -37883,133 +39521,123 @@ }; /** - * Decodes a GenerateInitialChangeStreamPartitionsResponse message from the specified reader or buffer, length delimited. + * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} GenerateInitialChangeStreamPartitionsResponse + * @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 */ - GenerateInitialChangeStreamPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { + CheckAndMutateRowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GenerateInitialChangeStreamPartitionsResponse message. + * Verifies a CheckAndMutateRowResponse message. * @function verify - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @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 */ - GenerateInitialChangeStreamPartitionsResponse.verify = function verify(message) { + CheckAndMutateRowResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.partition != null && message.hasOwnProperty("partition")) { - var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); - if (error) - return "partition." + error; - } + if (message.predicateMatched != null && message.hasOwnProperty("predicateMatched")) + if (typeof message.predicateMatched !== "boolean") + return "predicateMatched: boolean expected"; return null; }; /** - * Creates a GenerateInitialChangeStreamPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CheckAndMutateRowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} GenerateInitialChangeStreamPartitionsResponse + * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse */ - GenerateInitialChangeStreamPartitionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) + CheckAndMutateRowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowResponse) return object; - var message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.partition: object expected"); - message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); - } + 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 GenerateInitialChangeStreamPartitionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CheckAndMutateRowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @static - * @param {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} message GenerateInitialChangeStreamPartitionsResponse + * @param {google.bigtable.v2.CheckAndMutateRowResponse} message CheckAndMutateRowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateInitialChangeStreamPartitionsResponse.toObject = function toObject(message, options) { + CheckAndMutateRowResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.partition = null; - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); + object.predicateMatched = false; + if (message.predicateMatched != null && message.hasOwnProperty("predicateMatched")) + object.predicateMatched = message.predicateMatched; return object; }; /** - * Converts this GenerateInitialChangeStreamPartitionsResponse to JSON. + * Converts this CheckAndMutateRowResponse to JSON. * @function toJSON - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @instance * @returns {Object.} JSON object */ - GenerateInitialChangeStreamPartitionsResponse.prototype.toJSON = function toJSON() { + CheckAndMutateRowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GenerateInitialChangeStreamPartitionsResponse + * Gets the default type url for CheckAndMutateRowResponse * @function getTypeUrl - * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @memberof google.bigtable.v2.CheckAndMutateRowResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerateInitialChangeStreamPartitionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CheckAndMutateRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse"; + return typeUrlPrefix + "/google.bigtable.v2.CheckAndMutateRowResponse"; }; - return GenerateInitialChangeStreamPartitionsResponse; + return CheckAndMutateRowResponse; })(); - v2.ReadChangeStreamRequest = (function() { + v2.PingAndWarmRequest = (function() { /** - * Properties of a ReadChangeStreamRequest. + * Properties of a PingAndWarmRequest. * @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 + * @interface IPingAndWarmRequest + * @property {string|null} [name] PingAndWarmRequest name + * @property {string|null} [appProfileId] PingAndWarmRequest appProfileId */ /** - * Constructs a new ReadChangeStreamRequest. + * Constructs a new PingAndWarmRequest. * @memberof google.bigtable.v2 - * @classdesc Represents a ReadChangeStreamRequest. - * @implements IReadChangeStreamRequest + * @classdesc Represents a PingAndWarmRequest. + * @implements IPingAndWarmRequest * @constructor - * @param {google.bigtable.v2.IReadChangeStreamRequest=} [properties] Properties to set + * @param {google.bigtable.v2.IPingAndWarmRequest=} [properties] Properties to set */ - function ReadChangeStreamRequest(properties) { + function PingAndWarmRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38017,175 +39645,91 @@ } /** - * ReadChangeStreamRequest tableName. - * @member {string} tableName - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * PingAndWarmRequest name. + * @member {string} name + * @memberof google.bigtable.v2.PingAndWarmRequest * @instance */ - ReadChangeStreamRequest.prototype.tableName = ""; + PingAndWarmRequest.prototype.name = ""; /** - * ReadChangeStreamRequest appProfileId. + * PingAndWarmRequest 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 + * @memberof google.bigtable.v2.PingAndWarmRequest * @instance */ - ReadChangeStreamRequest.prototype.partition = null; + PingAndWarmRequest.prototype.appProfileId = ""; /** - * 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. + * Creates a new PingAndWarmRequest instance using the specified properties. * @function create - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @memberof google.bigtable.v2.PingAndWarmRequest * @static - * @param {google.bigtable.v2.IReadChangeStreamRequest=} [properties] Properties to set - * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest instance + * @param {google.bigtable.v2.IPingAndWarmRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest instance */ - ReadChangeStreamRequest.create = function create(properties) { - return new ReadChangeStreamRequest(properties); + PingAndWarmRequest.create = function create(properties) { + return new PingAndWarmRequest(properties); }; /** - * Encodes the specified ReadChangeStreamRequest message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamRequest.verify|verify} messages. + * Encodes the specified PingAndWarmRequest message. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @memberof google.bigtable.v2.PingAndWarmRequest * @static - * @param {google.bigtable.v2.IReadChangeStreamRequest} message ReadChangeStreamRequest message or plain object to encode + * @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 */ - ReadChangeStreamRequest.encode = function encode(message, writer) { + PingAndWarmRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.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); - 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()).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()).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()).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()).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()).ldelim(); return writer; }; /** - * Encodes the specified ReadChangeStreamRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamRequest.verify|verify} messages. + * Encodes the specified PingAndWarmRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @memberof google.bigtable.v2.PingAndWarmRequest * @static - * @param {google.bigtable.v2.IReadChangeStreamRequest} message ReadChangeStreamRequest message or plain object to encode + * @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 */ - ReadChangeStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + PingAndWarmRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReadChangeStreamRequest message from the specified reader or buffer. + * Decodes a PingAndWarmRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @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.ReadChangeStreamRequest} ReadChangeStreamRequest + * @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 */ - ReadChangeStreamRequest.decode = function decode(reader, length) { + PingAndWarmRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tableName = reader.string(); + message.name = reader.string(); break; } case 2: { message.appProfileId = reader.string(); break; } - case 3: { - message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); - break; - } - case 4: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.decode(reader, reader.uint32()); - break; - } - case 5: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.heartbeatDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -38195,211 +39739,130 @@ }; /** - * Decodes a ReadChangeStreamRequest message from the specified reader or buffer, length delimited. + * Decodes a PingAndWarmRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @memberof google.bigtable.v2.PingAndWarmRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest + * @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 */ - ReadChangeStreamRequest.decodeDelimited = function decodeDelimited(reader) { + PingAndWarmRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReadChangeStreamRequest message. + * Verifies a PingAndWarmRequest message. * @function verify - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @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 */ - ReadChangeStreamRequest.verify = function verify(message) { + PingAndWarmRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.partition != null && message.hasOwnProperty("partition")) { - var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); - if (error) - return "partition." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - properties.startFrom = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - } - if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { - if (properties.startFrom === 1) - return "startFrom: multiple values"; - properties.startFrom = 1; - { - var error = $root.google.bigtable.v2.StreamContinuationTokens.verify(message.continuationTokens); - if (error) - return "continuationTokens." + error; - } - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) { - var error = $root.google.protobuf.Duration.verify(message.heartbeatDuration); - if (error) - return "heartbeatDuration." + error; - } return null; }; /** - * Creates a ReadChangeStreamRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PingAndWarmRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @memberof google.bigtable.v2.PingAndWarmRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest */ - ReadChangeStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamRequest) + PingAndWarmRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.PingAndWarmRequest) return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamRequest(); - if (object.tableName != null) - message.tableName = String(object.tableName); + 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); - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.partition: object expected"); - message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.continuationTokens != null) { - if (typeof object.continuationTokens !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.continuationTokens: object expected"); - message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.fromObject(object.continuationTokens); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.heartbeatDuration != null) { - if (typeof object.heartbeatDuration !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.heartbeatDuration: object expected"); - message.heartbeatDuration = $root.google.protobuf.Duration.fromObject(object.heartbeatDuration); - } return message; }; /** - * Creates a plain object from a ReadChangeStreamRequest message. Also converts values to other types if specified. + * Creates a plain object from a PingAndWarmRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @memberof google.bigtable.v2.PingAndWarmRequest * @static - * @param {google.bigtable.v2.ReadChangeStreamRequest} message ReadChangeStreamRequest + * @param {google.bigtable.v2.PingAndWarmRequest} message PingAndWarmRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadChangeStreamRequest.toObject = function toObject(message, options) { + PingAndWarmRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tableName = ""; + object.name = ""; object.appProfileId = ""; - object.partition = null; - object.endTime = null; - object.heartbeatDuration = null; } - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) { - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (options.oneofs) - object.startFrom = "startTime"; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { - object.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.toObject(message.continuationTokens, options); - if (options.oneofs) - object.startFrom = "continuationTokens"; - } - if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) - object.heartbeatDuration = $root.google.protobuf.Duration.toObject(message.heartbeatDuration, options); return object; }; /** - * Converts this ReadChangeStreamRequest to JSON. + * Converts this PingAndWarmRequest to JSON. * @function toJSON - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @memberof google.bigtable.v2.PingAndWarmRequest * @instance * @returns {Object.} JSON object */ - ReadChangeStreamRequest.prototype.toJSON = function toJSON() { + PingAndWarmRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReadChangeStreamRequest + * Gets the default type url for PingAndWarmRequest * @function getTypeUrl - * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @memberof google.bigtable.v2.PingAndWarmRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReadChangeStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PingAndWarmRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamRequest"; + return typeUrlPrefix + "/google.bigtable.v2.PingAndWarmRequest"; }; - return ReadChangeStreamRequest; + return PingAndWarmRequest; })(); - v2.ReadChangeStreamResponse = (function() { + v2.PingAndWarmResponse = (function() { /** - * Properties of a ReadChangeStreamResponse. + * Properties of a PingAndWarmResponse. * @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 + * @interface IPingAndWarmResponse */ /** - * Constructs a new ReadChangeStreamResponse. + * Constructs a new PingAndWarmResponse. * @memberof google.bigtable.v2 - * @classdesc Represents a ReadChangeStreamResponse. - * @implements IReadChangeStreamResponse + * @classdesc Represents a PingAndWarmResponse. + * @implements IPingAndWarmResponse * @constructor - * @param {google.bigtable.v2.IReadChangeStreamResponse=} [properties] Properties to set + * @param {google.bigtable.v2.IPingAndWarmResponse=} [properties] Properties to set */ - function ReadChangeStreamResponse(properties) { + function PingAndWarmResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38407,119 +39870,63 @@ } /** - * 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. + * Creates a new PingAndWarmResponse instance using the specified properties. * @function create - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @memberof google.bigtable.v2.PingAndWarmResponse * @static - * @param {google.bigtable.v2.IReadChangeStreamResponse=} [properties] Properties to set - * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse instance + * @param {google.bigtable.v2.IPingAndWarmResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse instance */ - ReadChangeStreamResponse.create = function create(properties) { - return new ReadChangeStreamResponse(properties); + PingAndWarmResponse.create = function create(properties) { + return new PingAndWarmResponse(properties); }; /** - * Encodes the specified ReadChangeStreamResponse message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.verify|verify} messages. + * Encodes the specified PingAndWarmResponse message. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @memberof google.bigtable.v2.PingAndWarmResponse * @static - * @param {google.bigtable.v2.IReadChangeStreamResponse} message ReadChangeStreamResponse message or plain object to encode + * @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 */ - ReadChangeStreamResponse.encode = function encode(message, writer) { + PingAndWarmResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).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()).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()).ldelim(); return writer; }; /** - * Encodes the specified ReadChangeStreamResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.verify|verify} messages. + * Encodes the specified PingAndWarmResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @memberof google.bigtable.v2.PingAndWarmResponse * @static - * @param {google.bigtable.v2.IReadChangeStreamResponse} message ReadChangeStreamResponse message or plain object to encode + * @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 */ - ReadChangeStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { + PingAndWarmResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReadChangeStreamResponse message from the specified reader or buffer. + * Decodes a PingAndWarmResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @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.ReadChangeStreamResponse} ReadChangeStreamResponse + * @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 */ - ReadChangeStreamResponse.decode = function decode(reader, length) { + PingAndWarmResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.decode(reader, reader.uint32()); - break; - } - case 2: { - message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.decode(reader, reader.uint32()); - break; - } - case 3: { - message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -38529,1765 +39936,1259 @@ }; /** - * Decodes a ReadChangeStreamResponse message from the specified reader or buffer, length delimited. + * Decodes a PingAndWarmResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @memberof google.bigtable.v2.PingAndWarmResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse + * @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 */ - ReadChangeStreamResponse.decodeDelimited = function decodeDelimited(reader) { + PingAndWarmResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReadChangeStreamResponse message. + * Verifies a PingAndWarmResponse message. * @function verify - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @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 */ - ReadChangeStreamResponse.verify = function verify(message) { + PingAndWarmResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.dataChange != null && message.hasOwnProperty("dataChange")) { - properties.streamRecord = 1; - { - var error = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify(message.dataChange); - if (error) - return "dataChange." + error; - } - } - if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { - if (properties.streamRecord === 1) - return "streamRecord: multiple values"; - properties.streamRecord = 1; - { - var error = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify(message.heartbeat); - if (error) - return "heartbeat." + error; - } - } - if (message.closeStream != null && message.hasOwnProperty("closeStream")) { - if (properties.streamRecord === 1) - return "streamRecord: multiple values"; - properties.streamRecord = 1; - { - var error = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify(message.closeStream); - if (error) - return "closeStream." + error; - } - } return null; }; /** - * Creates a ReadChangeStreamResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PingAndWarmResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @memberof google.bigtable.v2.PingAndWarmResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse */ - ReadChangeStreamResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse) + PingAndWarmResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.PingAndWarmResponse) return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); - if (object.dataChange != null) { - if (typeof object.dataChange !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.dataChange: object expected"); - message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.fromObject(object.dataChange); - } - if (object.heartbeat != null) { - if (typeof object.heartbeat !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.heartbeat: object expected"); - message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.fromObject(object.heartbeat); - } - if (object.closeStream != null) { - if (typeof object.closeStream !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.closeStream: object expected"); - message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.fromObject(object.closeStream); - } - return message; + return new $root.google.bigtable.v2.PingAndWarmResponse(); }; /** - * Creates a plain object from a ReadChangeStreamResponse message. Also converts values to other types if specified. + * Creates a plain object from a PingAndWarmResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @memberof google.bigtable.v2.PingAndWarmResponse * @static - * @param {google.bigtable.v2.ReadChangeStreamResponse} message ReadChangeStreamResponse + * @param {google.bigtable.v2.PingAndWarmResponse} message PingAndWarmResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadChangeStreamResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.dataChange != null && message.hasOwnProperty("dataChange")) { - object.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.toObject(message.dataChange, options); - if (options.oneofs) - object.streamRecord = "dataChange"; - } - if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { - object.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.toObject(message.heartbeat, options); - if (options.oneofs) - object.streamRecord = "heartbeat"; - } - if (message.closeStream != null && message.hasOwnProperty("closeStream")) { - object.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.toObject(message.closeStream, options); - if (options.oneofs) - object.streamRecord = "closeStream"; - } - return object; + PingAndWarmResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ReadChangeStreamResponse to JSON. + * Converts this PingAndWarmResponse to JSON. * @function toJSON - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @memberof google.bigtable.v2.PingAndWarmResponse * @instance * @returns {Object.} JSON object */ - ReadChangeStreamResponse.prototype.toJSON = function toJSON() { + PingAndWarmResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReadChangeStreamResponse + * Gets the default type url for PingAndWarmResponse * @function getTypeUrl - * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @memberof google.bigtable.v2.PingAndWarmResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReadChangeStreamResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PingAndWarmResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse"; + return typeUrlPrefix + "/google.bigtable.v2.PingAndWarmResponse"; }; - ReadChangeStreamResponse.MutationChunk = (function() { + return PingAndWarmResponse; + })(); - /** - * 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 - */ + v2.ReadModifyWriteRowRequest = (function() { - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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 + */ - /** - * MutationChunk chunkInfo. - * @member {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo|null|undefined} chunkInfo - * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk - * @instance - */ - MutationChunk.prototype.chunkInfo = null; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * MutationChunk mutation. - * @member {google.bigtable.v2.IMutation|null|undefined} mutation - * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk - * @instance - */ - MutationChunk.prototype.mutation = null; + /** + * ReadModifyWriteRowRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.tableName = ""; - /** - * 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); - }; + /** + * ReadModifyWriteRowRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.authorizedViewName = ""; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).ldelim(); - return writer; - }; + /** + * ReadModifyWriteRowRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.appProfileId = ""; - /** - * 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).ldelim(); - }; + /** + * ReadModifyWriteRowRequest rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.rowKey = $util.newBuffer([]); - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.decode(reader, reader.uint32()); - break; - } - case 2: { - message.mutation = $root.google.bigtable.v2.Mutation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); + if (message.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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + 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()); - }; + /** + * 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 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) { - var error = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify(message.chunkInfo); - if (error) - return "chunkInfo." + error; - } - if (message.mutation != null && message.hasOwnProperty("mutation")) { - var error = $root.google.bigtable.v2.Mutation.verify(message.mutation); + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.bigtable.v2.ReadModifyWriteRule.verify(message.rules[i]); if (error) - return "mutation." + error; + return "rules." + error; } - return null; - }; + } + 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) - return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(); - if (object.chunkInfo != null) { - if (typeof object.chunkInfo !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.chunkInfo: object expected"); - message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.fromObject(object.chunkInfo); - } - if (object.mutation != null) { - if (typeof object.mutation !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.mutation: object expected"); - message.mutation = $root.google.bigtable.v2.Mutation.fromObject(object.mutation); + /** + * 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) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowRequest) + return object; + 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 (typeof object.rules[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest.rules: object expected"); + message.rules[i] = $root.google.bigtable.v2.ReadModifyWriteRule.fromObject(object.rules[i]); } - return message; - }; + } + 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.chunkInfo = null; - object.mutation = null; + /** + * 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) { + if (!options) + options = {}; + 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); } - if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) - object.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.toObject(message.chunkInfo, options); - if (message.mutation != null && message.hasOwnProperty("mutation")) - object.mutation = $root.google.bigtable.v2.Mutation.toObject(message.mutation, options); - return object; - }; + object.appProfileId = ""; + object.authorizedViewName = ""; + } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.rowKey != null && message.hasOwnProperty("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); + } + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + 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); - }; + /** + * 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 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"; - }; + /** + * 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"; + }; - MutationChunk.ChunkInfo = (function() { + return ReadModifyWriteRowRequest; + })(); - /** - * 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 - */ + v2.ReadModifyWriteRowResponse = (function() { - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ChunkInfo chunkedValueSize. - * @member {number} chunkedValueSize - * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo - * @instance - */ - ChunkInfo.prototype.chunkedValueSize = 0; + /** + * Properties of a ReadModifyWriteRowResponse. + * @memberof google.bigtable.v2 + * @interface IReadModifyWriteRowResponse + * @property {google.bigtable.v2.IRow|null} [row] ReadModifyWriteRowResponse row + */ - /** - * ChunkInfo chunkedValueOffset. - * @member {number} chunkedValueOffset - * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo - * @instance - */ - ChunkInfo.prototype.chunkedValueOffset = 0; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * ChunkInfo lastChunk. - * @member {boolean} lastChunk - * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo - * @instance - */ - ChunkInfo.prototype.lastChunk = false; + /** + * ReadModifyWriteRowResponse row. + * @member {google.bigtable.v2.IRow|null|undefined} row + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @instance + */ + ReadModifyWriteRowResponse.prototype.row = null; - /** - * 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); - }; + /** + * 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 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) { - if (!writer) - writer = $Writer.create(); - 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 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) { + if (!writer) + writer = $Writer.create(); + 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()).ldelim(); + 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).ldelim(); - }; + /** + * 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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); - break; - } + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.row = $root.google.bigtable.v2.Row.decode(reader, reader.uint32()); + 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()); - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) - if (!$util.isInteger(message.chunkedValueSize)) - return "chunkedValueSize: integer expected"; - if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) - if (!$util.isInteger(message.chunkedValueOffset)) - return "chunkedValueOffset: integer expected"; - if (message.lastChunk != null && message.hasOwnProperty("lastChunk")) - if (typeof message.lastChunk !== "boolean") - return "lastChunk: boolean expected"; - return null; - }; + /** + * 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()); + }; - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) - return object; - 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; - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.row != null && message.hasOwnProperty("row")) { + var error = $root.google.bigtable.v2.Row.verify(message.row); + if (error) + return "row." + error; + } + return null; + }; - /** - * 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.chunkedValueSize = 0; - object.chunkedValueOffset = 0; - object.lastChunk = false; - } - if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) - object.chunkedValueSize = message.chunkedValueSize; - if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) - object.chunkedValueOffset = message.chunkedValueOffset; - if (message.lastChunk != null && message.hasOwnProperty("lastChunk")) - object.lastChunk = message.lastChunk; - return object; - }; + /** + * 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) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowResponse) + return object; + var message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); + if (object.row != null) { + if (typeof object.row !== "object") + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowResponse.row: object expected"); + message.row = $root.google.bigtable.v2.Row.fromObject(object.row); + } + return message; + }; - /** - * 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); - }; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.row = null; + if (message.row != null && message.hasOwnProperty("row")) + object.row = $root.google.bigtable.v2.Row.toObject(message.row, options); + return object; + }; - /** - * 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"; - }; + /** + * 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); + }; - return ChunkInfo; - })(); + /** + * 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 MutationChunk; - })(); + return ReadModifyWriteRowResponse; + })(); - ReadChangeStreamResponse.DataChange = (function() { + v2.GenerateInitialChangeStreamPartitionsRequest = (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 - */ + /** + * 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 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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) + 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; + /** + * GenerateInitialChangeStreamPartitionsRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @instance + */ + GenerateInitialChangeStreamPartitionsRequest.prototype.tableName = ""; - /** - * DataChange sourceClusterId. - * @member {string} sourceClusterId - * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange - * @instance - */ - DataChange.prototype.sourceClusterId = ""; + /** + * GenerateInitialChangeStreamPartitionsRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @instance + */ + GenerateInitialChangeStreamPartitionsRequest.prototype.appProfileId = ""; - /** - * DataChange rowKey. - * @member {Uint8Array} rowKey - * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange - * @instance - */ - DataChange.prototype.rowKey = $util.newBuffer([]); + /** + * 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); + }; - /** - * DataChange commitTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} commitTimestamp - * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange - * @instance - */ - DataChange.prototype.commitTimestamp = null; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + return writer; + }; - /** - * DataChange tiebreaker. - * @member {number} tiebreaker - * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange - * @instance - */ - DataChange.prototype.tiebreaker = 0; + /** + * 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).ldelim(); + }; - /** - * DataChange chunks. - * @member {Array.} chunks - * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange - * @instance - */ - DataChange.prototype.chunks = $util.emptyArray; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * DataChange done. - * @member {boolean} done - * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange - * @instance - */ - DataChange.prototype.done = false; + /** + * 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()); + }; - /** - * DataChange token. - * @member {string} token - * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange - * @instance - */ - DataChange.prototype.token = ""; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + return null; + }; - /** - * DataChange estimatedLowWatermark. - * @member {google.protobuf.ITimestamp|null|undefined} estimatedLowWatermark - * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange - * @instance - */ - DataChange.prototype.estimatedLowWatermark = 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) { + if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) + return object; + 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 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); - }; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + return object; + }; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.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()).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()).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()).ldelim(); - return writer; - }; + /** + * 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); + }; - /** - * 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).ldelim(); - }; + /** + * 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"; + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - 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()); - 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())); - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return GenerateInitialChangeStreamPartitionsRequest; + })(); - /** - * 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()); - }; + v2.GenerateInitialChangeStreamPartitionsResponse = (function() { - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.sourceClusterId != null && message.hasOwnProperty("sourceClusterId")) - if (!$util.isString(message.sourceClusterId)) - return "sourceClusterId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) - if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) - return "rowKey: buffer expected"; - if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp); - if (error) - return "commitTimestamp." + error; - } - if (message.tiebreaker != null && message.hasOwnProperty("tiebreaker")) - if (!$util.isInteger(message.tiebreaker)) - return "tiebreaker: integer expected"; - if (message.chunks != null && message.hasOwnProperty("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]); - if (error) - return "chunks." + error; - } - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { - var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark); - if (error) - return "estimatedLowWatermark." + error; - } - return null; - }; + /** + * Properties of a GenerateInitialChangeStreamPartitionsResponse. + * @memberof google.bigtable.v2 + * @interface IGenerateInitialChangeStreamPartitionsResponse + * @property {google.bigtable.v2.IStreamPartition|null} [partition] GenerateInitialChangeStreamPartitionsResponse partition + */ - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange) - return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); 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 (typeof object.commitTimestamp !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.commitTimestamp: object expected"); - message.commitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.commitTimestamp); - } - 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 (typeof object.chunks[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.chunks: object expected"); - message.chunks[i] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.fromObject(object.chunks[i]); - } - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.token != null) - message.token = String(object.token); - if (object.estimatedLowWatermark != null) { - if (typeof object.estimatedLowWatermark !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.estimatedLowWatermark: object expected"); - message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark); } - return message; - }; + } + 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) { - if (!options) - options = {}; - 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 && message.hasOwnProperty("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 && message.hasOwnProperty("sourceClusterId")) - object.sourceClusterId = message.sourceClusterId; - if (message.rowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("commitTimestamp")) - object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options); - if (message.tiebreaker != null && message.hasOwnProperty("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); - } - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.token != null && message.hasOwnProperty("token")) - object.token = message.token; - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) - object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); + 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) { + if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) return object; - }; + var message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); + } + return message; + }; - /** - * 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); - }; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partition = null; + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); + return object; + }; - /** - * 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"; - }; + /** + * 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); + }; - /** - * 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; - })(); + /** + * 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 DataChange; - })(); + return GenerateInitialChangeStreamPartitionsResponse; + })(); - ReadChangeStreamResponse.Heartbeat = (function() { + v2.ReadChangeStreamRequest = (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 - */ + /** + * 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 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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) + 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; + /** + * ReadChangeStreamRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.tableName = ""; - /** - * Heartbeat estimatedLowWatermark. - * @member {google.protobuf.ITimestamp|null|undefined} estimatedLowWatermark - * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat - * @instance - */ - Heartbeat.prototype.estimatedLowWatermark = null; + /** + * ReadChangeStreamRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.appProfileId = ""; - /** - * 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); - }; + /** + * ReadChangeStreamRequest partition. + * @member {google.bigtable.v2.IStreamPartition|null|undefined} partition + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.partition = null; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).ldelim(); - return writer; - }; + /** + * ReadChangeStreamRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.startTime = null; - /** - * 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).ldelim(); - }; + /** + * ReadChangeStreamRequest continuationTokens. + * @member {google.bigtable.v2.IStreamContinuationTokens|null|undefined} continuationTokens + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.continuationTokens = null; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32()); - break; - } - case 2: { - message.estimatedLowWatermark = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ReadChangeStreamRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.endTime = null; - /** - * 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()); - }; + /** + * ReadChangeStreamRequest heartbeatDuration. + * @member {google.protobuf.IDuration|null|undefined} heartbeatDuration + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.heartbeatDuration = null; - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) { - var error = $root.google.bigtable.v2.StreamContinuationToken.verify(message.continuationToken); - if (error) - return "continuationToken." + error; - } - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { - var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark); - if (error) - return "estimatedLowWatermark." + error; - } - return null; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) - return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(); - if (object.continuationToken != null) { - if (typeof object.continuationToken !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.continuationToken: object expected"); - message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationToken); - } - if (object.estimatedLowWatermark != null) { - if (typeof object.estimatedLowWatermark !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.estimatedLowWatermark: object expected"); - message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark); - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.continuationToken = null; - object.estimatedLowWatermark = null; - } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) - object.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationToken, options); - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) - object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); - 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) - 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) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - switch (tag >>> 3) { - case 1: { - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.continuationTokens && message.continuationTokens.length)) - message.continuationTokens = []; - message.continuationTokens.push($root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.newPartitions && message.newPartitions.length)) - message.newPartitions = []; - message.newPartitions.push($root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - if (error) - return "status." + error; - } - if (message.continuationTokens != null && message.hasOwnProperty("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]); - if (error) - return "continuationTokens." + error; - } - } - if (message.newPartitions != null && message.hasOwnProperty("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]); - 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) { - if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) - return object; - var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(); - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); - } - 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 (typeof object.continuationTokens[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.continuationTokens: object expected"); - message.continuationTokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationTokens[i]); - } - } - 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 (typeof object.newPartitions[i] !== "object") - throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newPartitions: object expected"); - message.newPartitions[i] = $root.google.bigtable.v2.StreamPartition.fromObject(object.newPartitions[i]); - } - } - 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) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.continuationTokens = []; - object.newPartitions = []; - } - if (options.defaults) - object.status = null; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); - 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); - } - 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); - } - 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.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) - 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; + /** + * 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 Row instance using the specified properties. + * Creates a new ReadChangeStreamRequest instance using the specified properties. * @function create - * @memberof google.bigtable.v2.Row + * @memberof google.bigtable.v2.ReadChangeStreamRequest * @static - * @param {google.bigtable.v2.IRow=} [properties] Properties to set - * @returns {google.bigtable.v2.Row} Row instance + * @param {google.bigtable.v2.IReadChangeStreamRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest instance */ - Row.create = function create(properties) { - return new Row(properties); + ReadChangeStreamRequest.create = function create(properties) { + return new ReadChangeStreamRequest(properties); }; /** - * Encodes the specified Row message. Does not implicitly {@link google.bigtable.v2.Row.verify|verify} messages. + * Encodes the specified ReadChangeStreamRequest message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.Row + * @memberof google.bigtable.v2.ReadChangeStreamRequest * @static - * @param {google.bigtable.v2.IRow} message Row message or plain object to encode + * @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 */ - Row.encode = function encode(message, writer) { + ReadChangeStreamRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).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()).ldelim(); + 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()).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()).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()).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()).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()).ldelim(); return writer; }; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.bigtable.v2.Row.verify|verify} messages. + * Encodes the specified ReadChangeStreamRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.Row + * @memberof google.bigtable.v2.ReadChangeStreamRequest * @static - * @param {google.bigtable.v2.IRow} message Row message or plain object to encode + * @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 */ - Row.encodeDelimited = function encodeDelimited(message, writer) { + ReadChangeStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a ReadChangeStreamRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.Row + * @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.Row} Row + * @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 */ - Row.decode = function decode(reader, length) { + ReadChangeStreamRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Row(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.key = reader.bytes(); + message.tableName = reader.string(); break; } case 2: { - if (!(message.families && message.families.length)) - message.families = []; - message.families.push($root.google.bigtable.v2.Family.decode(reader, reader.uint32())); + message.appProfileId = reader.string(); + break; + } + case 3: { + message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); + break; + } + case 4: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.decode(reader, reader.uint32()); + break; + } + case 5: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.heartbeatDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -40299,159 +41200,211 @@ }; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a ReadChangeStreamRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.Row + * @memberof google.bigtable.v2.ReadChangeStreamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.Row} Row + * @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 */ - Row.decodeDelimited = function decodeDelimited(reader) { + ReadChangeStreamRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Row message. + * Verifies a ReadChangeStreamRequest message. * @function verify - * @memberof google.bigtable.v2.Row + * @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 */ - Row.verify = function verify(message) { + ReadChangeStreamRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.families != null && message.hasOwnProperty("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]); + var properties = {}; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); + if (error) + return "partition." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + properties.startFrom = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) - return "families." + error; + return "startTime." + error; } } - return null; - }; - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. + if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { + if (properties.startFrom === 1) + return "startFrom: multiple values"; + properties.startFrom = 1; + { + var error = $root.google.bigtable.v2.StreamContinuationTokens.verify(message.continuationTokens); + if (error) + return "continuationTokens." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) { + var error = $root.google.protobuf.Duration.verify(message.heartbeatDuration); + 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.Row + * @memberof google.bigtable.v2.ReadChangeStreamRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.Row} Row + * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.Row) + ReadChangeStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamRequest) return object; - 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 (typeof object.families[i] !== "object") - throw TypeError(".google.bigtable.v2.Row.families: object expected"); - message.families[i] = $root.google.bigtable.v2.Family.fromObject(object.families[i]); - } + 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 (typeof object.partition !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.continuationTokens != null) { + if (typeof object.continuationTokens !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.continuationTokens: object expected"); + message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.fromObject(object.continuationTokens); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.heartbeatDuration != null) { + if (typeof object.heartbeatDuration !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.heartbeatDuration: object expected"); + message.heartbeatDuration = $root.google.protobuf.Duration.fromObject(object.heartbeatDuration); } return message; }; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. + * Creates a plain object from a ReadChangeStreamRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.Row + * @memberof google.bigtable.v2.ReadChangeStreamRequest * @static - * @param {google.bigtable.v2.Row} message Row + * @param {google.bigtable.v2.ReadChangeStreamRequest} message ReadChangeStreamRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Row.toObject = function toObject(message, options) { + ReadChangeStreamRequest.toObject = function toObject(message, options) { if (!options) options = {}; 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 && message.hasOwnProperty("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); + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.partition = null; + object.endTime = null; + object.heartbeatDuration = null; + } + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) { + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (options.oneofs) + object.startFrom = "startTime"; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { + object.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.toObject(message.continuationTokens, options); + if (options.oneofs) + object.startFrom = "continuationTokens"; } + if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) + object.heartbeatDuration = $root.google.protobuf.Duration.toObject(message.heartbeatDuration, options); return object; }; /** - * Converts this Row to JSON. + * Converts this ReadChangeStreamRequest to JSON. * @function toJSON - * @memberof google.bigtable.v2.Row + * @memberof google.bigtable.v2.ReadChangeStreamRequest * @instance * @returns {Object.} JSON object */ - Row.prototype.toJSON = function toJSON() { + ReadChangeStreamRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Row + * Gets the default type url for ReadChangeStreamRequest * @function getTypeUrl - * @memberof google.bigtable.v2.Row + * @memberof google.bigtable.v2.ReadChangeStreamRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReadChangeStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.Row"; + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamRequest"; }; - return Row; + return ReadChangeStreamRequest; })(); - v2.Family = (function() { + v2.ReadChangeStreamResponse = (function() { /** - * Properties of a Family. + * Properties of a ReadChangeStreamResponse. * @memberof google.bigtable.v2 - * @interface IFamily - * @property {string|null} [name] Family name - * @property {Array.|null} [columns] Family columns + * @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 Family. + * Constructs a new ReadChangeStreamResponse. * @memberof google.bigtable.v2 - * @classdesc Represents a Family. - * @implements IFamily + * @classdesc Represents a ReadChangeStreamResponse. + * @implements IReadChangeStreamResponse * @constructor - * @param {google.bigtable.v2.IFamily=} [properties] Properties to set + * @param {google.bigtable.v2.IReadChangeStreamResponse=} [properties] Properties to set */ - function Family(properties) { - this.columns = []; + function ReadChangeStreamResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40459,92 +41412,117 @@ } /** - * Family name. - * @member {string} name - * @memberof google.bigtable.v2.Family + * ReadChangeStreamResponse dataChange. + * @member {google.bigtable.v2.ReadChangeStreamResponse.IDataChange|null|undefined} dataChange + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @instance */ - Family.prototype.name = ""; + ReadChangeStreamResponse.prototype.dataChange = null; /** - * Family columns. - * @member {Array.} columns - * @memberof google.bigtable.v2.Family + * ReadChangeStreamResponse heartbeat. + * @member {google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat|null|undefined} heartbeat + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @instance */ - Family.prototype.columns = $util.emptyArray; + ReadChangeStreamResponse.prototype.heartbeat = null; /** - * Creates a new Family instance using the specified properties. + * 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.Family + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @static - * @param {google.bigtable.v2.IFamily=} [properties] Properties to set - * @returns {google.bigtable.v2.Family} Family instance + * @param {google.bigtable.v2.IReadChangeStreamResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse instance */ - Family.create = function create(properties) { - return new Family(properties); + ReadChangeStreamResponse.create = function create(properties) { + return new ReadChangeStreamResponse(properties); }; /** - * Encodes the specified Family message. Does not implicitly {@link google.bigtable.v2.Family.verify|verify} messages. + * Encodes the specified ReadChangeStreamResponse message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.Family + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @static - * @param {google.bigtable.v2.IFamily} message Family message or plain object to encode + * @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 */ - Family.encode = function encode(message, writer) { + ReadChangeStreamResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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()).ldelim(); + 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()).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()).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()).ldelim(); return writer; }; /** - * Encodes the specified Family message, length delimited. Does not implicitly {@link google.bigtable.v2.Family.verify|verify} messages. + * Encodes the specified ReadChangeStreamResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.Family + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @static - * @param {google.bigtable.v2.IFamily} message Family message or plain object to encode + * @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 */ - Family.encodeDelimited = function encodeDelimited(message, writer) { + ReadChangeStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Family message from the specified reader or buffer. + * Decodes a ReadChangeStreamResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.Family + * @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.Family} Family + * @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 */ - Family.decode = function decode(reader, length) { + ReadChangeStreamResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Family(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.bigtable.v2.Column.decode(reader, reader.uint32())); + message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.decode(reader, reader.uint32()); + break; + } + case 3: { + message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.decode(reader, reader.uint32()); break; } default: @@ -40556,1329 +41534,1676 @@ }; /** - * Decodes a Family message from the specified reader or buffer, length delimited. + * Decodes a ReadChangeStreamResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.Family + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.Family} Family + * @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 */ - Family.decodeDelimited = function decodeDelimited(reader) { + ReadChangeStreamResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Family message. + * Verifies a ReadChangeStreamResponse message. * @function verify - * @memberof google.bigtable.v2.Family + * @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 */ - Family.verify = function verify(message) { + ReadChangeStreamResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.bigtable.v2.Column.verify(message.columns[i]); + var properties = {}; + if (message.dataChange != null && message.hasOwnProperty("dataChange")) { + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify(message.dataChange); if (error) - return "columns." + error; + return "dataChange." + error; + } + } + if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { + if (properties.streamRecord === 1) + return "streamRecord: multiple values"; + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify(message.heartbeat); + if (error) + return "heartbeat." + error; + } + } + if (message.closeStream != null && message.hasOwnProperty("closeStream")) { + if (properties.streamRecord === 1) + return "streamRecord: multiple values"; + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify(message.closeStream); + if (error) + return "closeStream." + error; } } return null; }; /** - * Creates a Family message from a plain object. Also converts values to their respective internal types. + * Creates a ReadChangeStreamResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.Family + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.Family} Family + * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse */ - Family.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.Family) + ReadChangeStreamResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse) return object; - 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 (typeof object.columns[i] !== "object") - throw TypeError(".google.bigtable.v2.Family.columns: object expected"); - message.columns[i] = $root.google.bigtable.v2.Column.fromObject(object.columns[i]); - } + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); + if (object.dataChange != null) { + if (typeof object.dataChange !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.dataChange: object expected"); + message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.fromObject(object.dataChange); + } + if (object.heartbeat != null) { + if (typeof object.heartbeat !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.heartbeat: object expected"); + message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.fromObject(object.heartbeat); + } + if (object.closeStream != null) { + if (typeof object.closeStream !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.closeStream: object expected"); + message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.fromObject(object.closeStream); } return message; }; /** - * Creates a plain object from a Family message. Also converts values to other types if specified. + * Creates a plain object from a ReadChangeStreamResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.Family + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @static - * @param {google.bigtable.v2.Family} message Family + * @param {google.bigtable.v2.ReadChangeStreamResponse} message ReadChangeStreamResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Family.toObject = function toObject(message, options) { + ReadChangeStreamResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("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); + if (message.dataChange != null && message.hasOwnProperty("dataChange")) { + object.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.toObject(message.dataChange, options); + if (options.oneofs) + object.streamRecord = "dataChange"; + } + if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { + object.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.toObject(message.heartbeat, options); + if (options.oneofs) + object.streamRecord = "heartbeat"; + } + if (message.closeStream != null && message.hasOwnProperty("closeStream")) { + object.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.toObject(message.closeStream, options); + if (options.oneofs) + object.streamRecord = "closeStream"; } return object; }; /** - * Converts this Family to JSON. + * Converts this ReadChangeStreamResponse to JSON. * @function toJSON - * @memberof google.bigtable.v2.Family + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @instance * @returns {Object.} JSON object */ - Family.prototype.toJSON = function toJSON() { + ReadChangeStreamResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Family + * Gets the default type url for ReadChangeStreamResponse * @function getTypeUrl - * @memberof google.bigtable.v2.Family + * @memberof google.bigtable.v2.ReadChangeStreamResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Family.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReadChangeStreamResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.Family"; + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse"; }; - return Family; - })(); + ReadChangeStreamResponse.MutationChunk = (function() { - v2.Column = (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 + */ - /** - * 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 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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) - 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; - /** - * Column qualifier. - * @member {Uint8Array} qualifier - * @memberof google.bigtable.v2.Column - * @instance - */ - Column.prototype.qualifier = $util.newBuffer([]); + /** + * MutationChunk mutation. + * @member {google.bigtable.v2.IMutation|null|undefined} mutation + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @instance + */ + MutationChunk.prototype.mutation = null; - /** - * Column cells. - * @member {Array.} cells - * @memberof google.bigtable.v2.Column - * @instance - */ - Column.prototype.cells = $util.emptyArray; + /** + * 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); + }; - /** - * 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 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).ldelim(); + return writer; + }; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).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).ldelim(); - }; + /** + * 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Column(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mutation = $root.google.bigtable.v2.Mutation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + 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()); - }; + /** + * 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 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) - return "qualifier: buffer expected"; - if (message.cells != null && message.hasOwnProperty("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]); + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify(message.chunkInfo); if (error) - return "cells." + error; + return "chunkInfo." + 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) { - if (object instanceof $root.google.bigtable.v2.Column) - return object; - 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 (typeof object.cells[i] !== "object") - throw TypeError(".google.bigtable.v2.Column.cells: object expected"); - message.cells[i] = $root.google.bigtable.v2.Cell.fromObject(object.cells[i]); + if (message.mutation != null && message.hasOwnProperty("mutation")) { + var error = $root.google.bigtable.v2.Mutation.verify(message.mutation); + if (error) + return "mutation." + error; } - } - return message; - }; + return null; + }; - /** - * 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) { - if (!options) - options = {}; - 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); + /** + * 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + return object; + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(); + if (object.chunkInfo != null) { + if (typeof object.chunkInfo !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.chunkInfo: object expected"); + message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.fromObject(object.chunkInfo); } - if (message.qualifier != null && message.hasOwnProperty("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); - } - return object; - }; + if (object.mutation != null) { + if (typeof object.mutation !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.mutation: object expected"); + message.mutation = $root.google.bigtable.v2.Mutation.fromObject(object.mutation); + } + return message; + }; - /** - * 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); - }; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.chunkInfo = null; + object.mutation = null; + } + if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) + object.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.toObject(message.chunkInfo, options); + if (message.mutation != null && message.hasOwnProperty("mutation")) + object.mutation = $root.google.bigtable.v2.Mutation.toObject(message.mutation, options); + return object; + }; - /** - * 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"; - }; + /** + * 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); + }; - return Column; - })(); + /** + * 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"; + }; - v2.Cell = (function() { + MutationChunk.ChunkInfo = (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 - */ + /** + * 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 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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) + 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; + /** + * ChunkInfo chunkedValueSize. + * @member {number} chunkedValueSize + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @instance + */ + ChunkInfo.prototype.chunkedValueSize = 0; - /** - * Cell value. - * @member {Uint8Array} value - * @memberof google.bigtable.v2.Cell - * @instance - */ - Cell.prototype.value = $util.newBuffer([]); + /** + * ChunkInfo chunkedValueOffset. + * @member {number} chunkedValueOffset + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @instance + */ + ChunkInfo.prototype.chunkedValueOffset = 0; - /** - * Cell labels. - * @member {Array.} labels - * @memberof google.bigtable.v2.Cell - * @instance - */ - Cell.prototype.labels = $util.emptyArray; + /** + * ChunkInfo lastChunk. + * @member {boolean} lastChunk + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @instance + */ + ChunkInfo.prototype.lastChunk = false; - /** - * 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); - }; + /** + * 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 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) { - if (!writer) - writer = $Writer.create(); - 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 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) { + if (!writer) + writer = $Writer.create(); + 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 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).ldelim(); - }; + /** + * 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Cell(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + 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()); - }; + /** + * 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 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) - if (!$util.isString(message.labels[i])) - return "labels: string[] expected"; - } - return null; - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) + if (!$util.isInteger(message.chunkedValueSize)) + return "chunkedValueSize: integer expected"; + if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) + if (!$util.isInteger(message.chunkedValueOffset)) + return "chunkedValueOffset: integer expected"; + if (message.lastChunk != null && message.hasOwnProperty("lastChunk")) + if (typeof message.lastChunk !== "boolean") + return "lastChunk: boolean 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) { - if (object instanceof $root.google.bigtable.v2.Cell) - return object; - var message = new $root.google.bigtable.v2.Cell(); - if (object.timestampMicros != null) - if ($util.Long) - (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = 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 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + return object; + 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 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) { - if (!options) - options = {}; - 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() : long; - } else - object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("timestampMicros")) - 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 && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = message.labels[j]; - } - return object; - }; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.chunkedValueSize = 0; + object.chunkedValueOffset = 0; + object.lastChunk = false; + } + if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) + object.chunkedValueSize = message.chunkedValueSize; + if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) + object.chunkedValueOffset = message.chunkedValueOffset; + if (message.lastChunk != null && message.hasOwnProperty("lastChunk")) + object.lastChunk = message.lastChunk; + 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); - }; + /** + * 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 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"; - }; + /** + * 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 Cell; - })(); + return ChunkInfo; + })(); - v2.Value = (function() { + return MutationChunk; + })(); - /** - * Properties of a Value. - * @memberof google.bigtable.v2 - * @interface IValue - * @property {Uint8Array|null} [rawValue] Value rawValue - * @property {number|Long|null} [rawTimestampMicros] Value rawTimestampMicros - * @property {number|Long|null} [intValue] Value intValue - */ + ReadChangeStreamResponse.DataChange = (function() { - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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 + */ - /** - * Value rawValue. - * @member {Uint8Array|null|undefined} rawValue - * @memberof google.bigtable.v2.Value - * @instance - */ - Value.prototype.rawValue = null; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * Value rawTimestampMicros. - * @member {number|Long|null|undefined} rawTimestampMicros - * @memberof google.bigtable.v2.Value - * @instance - */ - Value.prototype.rawTimestampMicros = null; + /** + * DataChange type. + * @member {google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type} type + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.type = 0; - /** - * Value intValue. - * @member {number|Long|null|undefined} intValue - * @memberof google.bigtable.v2.Value - * @instance - */ - Value.prototype.intValue = null; + /** + * DataChange sourceClusterId. + * @member {string} sourceClusterId + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.sourceClusterId = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * DataChange rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.rowKey = $util.newBuffer([]); - /** - * Value kind. - * @member {"rawValue"|"rawTimestampMicros"|"intValue"|undefined} kind - * @memberof google.bigtable.v2.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["rawValue", "rawTimestampMicros", "intValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * DataChange commitTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} commitTimestamp + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.commitTimestamp = null; - /** - * 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); - }; + /** + * DataChange tiebreaker. + * @member {number} tiebreaker + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.tiebreaker = 0; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.intValue); - 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); - return writer; - }; + /** + * DataChange chunks. + * @member {Array.} chunks + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.chunks = $util.emptyArray; - /** - * 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).ldelim(); - }; + /** + * DataChange done. + * @member {boolean} done + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.done = false; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 8: { - message.rawValue = reader.bytes(); + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + 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())); + 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()); + break; + } + default: + reader.skipType(tag & 7); break; } - case 9: { - message.rawTimestampMicros = reader.int64(); + } + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: break; } - case 6: { - message.intValue = reader.int64(); - break; + if (message.sourceClusterId != null && message.hasOwnProperty("sourceClusterId")) + if (!$util.isString(message.sourceClusterId)) + return "sourceClusterId: string expected"; + if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp); + if (error) + return "commitTimestamp." + error; + } + if (message.tiebreaker != null && message.hasOwnProperty("tiebreaker")) + if (!$util.isInteger(message.tiebreaker)) + return "tiebreaker: integer expected"; + if (message.chunks != null && message.hasOwnProperty("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]); + if (error) + return "chunks." + error; } + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { + var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange) + return object; + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange(); + switch (object.type) { default: - reader.skipType(tag & 7); + 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; } - } - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rawValue != null && message.hasOwnProperty("rawValue")) { - properties.kind = 1; - if (!(message.rawValue && typeof message.rawValue.length === "number" || $util.isString(message.rawValue))) - return "rawValue: buffer expected"; - } - if (message.rawTimestampMicros != null && message.hasOwnProperty("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.intValue != null && message.hasOwnProperty("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"; - } - return null; - }; + 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 (typeof object.commitTimestamp !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.commitTimestamp: object expected"); + message.commitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.commitTimestamp); + } + 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 (typeof object.chunks[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.chunks: object expected"); + message.chunks[i] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.fromObject(object.chunks[i]); + } + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.token != null) + message.token = String(object.token); + if (object.estimatedLowWatermark != null) { + if (typeof object.estimatedLowWatermark !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.estimatedLowWatermark: object expected"); + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark); + } + return message; + }; - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.Value) + /** + * 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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 && message.hasOwnProperty("sourceClusterId")) + object.sourceClusterId = message.sourceClusterId; + if (message.rowKey != null && message.hasOwnProperty("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 && message.hasOwnProperty("commitTimestamp")) + object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options); + if (message.tiebreaker != null && message.hasOwnProperty("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); + } + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) + object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); return object; - var message = new $root.google.bigtable.v2.Value(); - 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)).unsigned = 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.intValue != null) - if ($util.Long) - (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = 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(); - 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) { - if (!options) - options = {}; - var object = {}; - if (message.intValue != null && message.hasOwnProperty("intValue")) { - 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.rawValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("rawTimestampMicros")) { - 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"; - } - 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); + }; - /** - * 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 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"; + }; - /** - * 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"; - }; + /** + * 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 Value; - })(); + return DataChange; + })(); - v2.RowRange = (function() { + ReadChangeStreamResponse.Heartbeat = (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 - */ + /** + * 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 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * RowRange startKeyClosed. - * @member {Uint8Array|null|undefined} startKeyClosed - * @memberof google.bigtable.v2.RowRange - * @instance - */ - RowRange.prototype.startKeyClosed = null; + /** + * Heartbeat continuationToken. + * @member {google.bigtable.v2.IStreamContinuationToken|null|undefined} continuationToken + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @instance + */ + Heartbeat.prototype.continuationToken = null; - /** - * RowRange startKeyOpen. - * @member {Uint8Array|null|undefined} startKeyOpen - * @memberof google.bigtable.v2.RowRange - * @instance - */ - RowRange.prototype.startKeyOpen = null; + /** + * Heartbeat estimatedLowWatermark. + * @member {google.protobuf.ITimestamp|null|undefined} estimatedLowWatermark + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @instance + */ + Heartbeat.prototype.estimatedLowWatermark = null; - /** - * RowRange endKeyOpen. - * @member {Uint8Array|null|undefined} endKeyOpen - * @memberof google.bigtable.v2.RowRange - * @instance - */ - RowRange.prototype.endKeyOpen = 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); + }; - /** - * RowRange endKeyClosed. - * @member {Uint8Array|null|undefined} endKeyClosed - * @memberof google.bigtable.v2.RowRange - * @instance - */ - RowRange.prototype.endKeyClosed = null; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).ldelim(); + return writer; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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).ldelim(); + }; - /** - * 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) - }); + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32()); + break; + } + case 2: { + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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) - }); + /** + * 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()); + }; - /** - * 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); - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) { + var error = $root.google.bigtable.v2.StreamContinuationToken.verify(message.continuationToken); + if (error) + return "continuationToken." + error; + } + if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { + var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark); + if (error) + return "estimatedLowWatermark." + error; + } + return null; + }; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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; - }; + /** + * 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) + return object; + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(); + if (object.continuationToken != null) { + if (typeof object.continuationToken !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.continuationToken: object expected"); + message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationToken); + } + if (object.estimatedLowWatermark != null) { + if (typeof object.estimatedLowWatermark !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.estimatedLowWatermark: object expected"); + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark); + } + return message; + }; - /** - * 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).ldelim(); - }; + /** + * 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.continuationToken = null; + object.estimatedLowWatermark = null; + } + if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + object.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationToken, options); + if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) + object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); + return object; + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - break; + /** + * 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 message; - }; + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse.Heartbeat"; + }; - /** - * 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()); - }; + return Heartbeat; + })(); - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.startKeyClosed != null && message.hasOwnProperty("startKeyClosed")) { - properties.startKey = 1; - if (!(message.startKeyClosed && typeof message.startKeyClosed.length === "number" || $util.isString(message.startKeyClosed))) - return "startKeyClosed: buffer expected"; - } - if (message.startKeyOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endKeyOpen")) { - properties.endKey = 1; - if (!(message.endKeyOpen && typeof message.endKeyOpen.length === "number" || $util.isString(message.endKeyOpen))) - return "endKeyOpen: buffer expected"; - } - if (message.endKeyClosed != null && message.hasOwnProperty("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; - }; + ReadChangeStreamResponse.CloseStream = (function() { - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.RowRange) - return object; - 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; - }; + /** + * 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 + */ - /** - * 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) { - if (!options) - options = {}; - var object = {}; - if (message.startKeyClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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"; + /** + * 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) + this[keys[i]] = properties[keys[i]]; } - 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); - }; + /** + * CloseStream status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @instance + */ + CloseStream.prototype.status = null; - /** - * 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"; - }; + /** + * CloseStream continuationTokens. + * @member {Array.} continuationTokens + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @instance + */ + CloseStream.prototype.continuationTokens = $util.emptyArray; - return RowRange; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.continuationTokens && message.continuationTokens.length)) + message.continuationTokens = []; + message.continuationTokens.push($root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.newPartitions && message.newPartitions.length)) + message.newPartitions = []; + message.newPartitions.push($root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + if (message.continuationTokens != null && message.hasOwnProperty("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]); + if (error) + return "continuationTokens." + error; + } + } + if (message.newPartitions != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + return object; + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + 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 (typeof object.continuationTokens[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.continuationTokens: object expected"); + message.continuationTokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationTokens[i]); + } + } + 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 (typeof object.newPartitions[i] !== "object") + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newPartitions: object expected"); + message.newPartitions[i] = $root.google.bigtable.v2.StreamPartition.fromObject(object.newPartitions[i]); + } + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.continuationTokens = []; + object.newPartitions = []; + } + if (options.defaults) + object.status = null; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + 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); + } + 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); + } + 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.RowSet = (function() { + v2.ExecuteQueryRequest = (function() { /** - * Properties of a RowSet. + * Properties of an ExecuteQueryRequest. * @memberof google.bigtable.v2 - * @interface IRowSet - * @property {Array.|null} [rowKeys] RowSet rowKeys - * @property {Array.|null} [rowRanges] RowSet rowRanges + * @interface IExecuteQueryRequest + * @property {string|null} [instanceName] ExecuteQueryRequest instanceName + * @property {string|null} [appProfileId] ExecuteQueryRequest appProfileId + * @property {string|null} [query] ExecuteQueryRequest query + * @property {google.bigtable.v2.IProtoFormat|null} [protoFormat] ExecuteQueryRequest protoFormat + * @property {Uint8Array|null} [resumeToken] ExecuteQueryRequest resumeToken + * @property {Object.|null} [params] ExecuteQueryRequest params */ /** - * Constructs a new RowSet. + * Constructs a new ExecuteQueryRequest. * @memberof google.bigtable.v2 - * @classdesc Represents a RowSet. - * @implements IRowSet + * @classdesc Represents an ExecuteQueryRequest. + * @implements IExecuteQueryRequest * @constructor - * @param {google.bigtable.v2.IRowSet=} [properties] Properties to set + * @param {google.bigtable.v2.IExecuteQueryRequest=} [properties] Properties to set */ - function RowSet(properties) { - this.rowKeys = []; - this.rowRanges = []; + function ExecuteQueryRequest(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41886,95 +43211,181 @@ } /** - * RowSet rowKeys. - * @member {Array.} rowKeys - * @memberof google.bigtable.v2.RowSet + * ExecuteQueryRequest instanceName. + * @member {string} instanceName + * @memberof google.bigtable.v2.ExecuteQueryRequest * @instance */ - RowSet.prototype.rowKeys = $util.emptyArray; + ExecuteQueryRequest.prototype.instanceName = ""; /** - * RowSet rowRanges. - * @member {Array.} rowRanges - * @memberof google.bigtable.v2.RowSet + * ExecuteQueryRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.ExecuteQueryRequest * @instance */ - RowSet.prototype.rowRanges = $util.emptyArray; + ExecuteQueryRequest.prototype.appProfileId = ""; /** - * Creates a new RowSet instance using the specified properties. + * ExecuteQueryRequest query. + * @member {string} query + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.query = ""; + + /** + * 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; + + // 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.RowSet + * @memberof google.bigtable.v2.ExecuteQueryRequest * @static - * @param {google.bigtable.v2.IRowSet=} [properties] Properties to set - * @returns {google.bigtable.v2.RowSet} RowSet instance + * @param {google.bigtable.v2.IExecuteQueryRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.ExecuteQueryRequest} ExecuteQueryRequest instance */ - RowSet.create = function create(properties) { - return new RowSet(properties); + ExecuteQueryRequest.create = function create(properties) { + return new ExecuteQueryRequest(properties); }; /** - * Encodes the specified RowSet message. Does not implicitly {@link google.bigtable.v2.RowSet.verify|verify} messages. + * Encodes the specified ExecuteQueryRequest message. Does not implicitly {@link google.bigtable.v2.ExecuteQueryRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.RowSet + * @memberof google.bigtable.v2.ExecuteQueryRequest * @static - * @param {google.bigtable.v2.IRowSet} message RowSet message or plain object to encode + * @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 */ - RowSet.encode = function encode(message, writer) { + ExecuteQueryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).ldelim(); + 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()).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()).ldelim().ldelim(); + } + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.resumeToken); return writer; }; /** - * Encodes the specified RowSet message, length delimited. Does not implicitly {@link google.bigtable.v2.RowSet.verify|verify} messages. + * Encodes the specified ExecuteQueryRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ExecuteQueryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.RowSet + * @memberof google.bigtable.v2.ExecuteQueryRequest * @static - * @param {google.bigtable.v2.IRowSet} message RowSet message or plain object to encode + * @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 */ - RowSet.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RowSet message from the specified reader or buffer. + * Decodes an ExecuteQueryRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.RowSet + * @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.RowSet} RowSet + * @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 */ - RowSet.decode = function decode(reader, length) { + ExecuteQueryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowSet(); + 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(); switch (tag >>> 3) { case 1: { - if (!(message.rowKeys && message.rowKeys.length)) - message.rowKeys = []; - message.rowKeys.push(reader.bytes()); + message.instanceName = reader.string(); break; } case 2: { - if (!(message.rowRanges && message.rowRanges.length)) - message.rowRanges = []; - message.rowRanges.push($root.google.bigtable.v2.RowRange.decode(reader, reader.uint32())); + 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()); + 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()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.params[key] = value; break; } default: @@ -41986,167 +43397,204 @@ }; /** - * Decodes a RowSet message from the specified reader or buffer, length delimited. + * Decodes an ExecuteQueryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.RowSet + * @memberof google.bigtable.v2.ExecuteQueryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.RowSet} RowSet + * @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 */ - RowSet.decodeDelimited = function decodeDelimited(reader) { + ExecuteQueryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RowSet message. + * Verifies an ExecuteQueryRequest message. * @function verify - * @memberof google.bigtable.v2.RowSet + * @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 */ - RowSet.verify = function verify(message) { + ExecuteQueryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rowKeys != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); + var properties = {}; + if (message.instanceName != null && message.hasOwnProperty("instanceName")) + if (!$util.isString(message.instanceName)) + return "instanceName: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { + properties.dataFormat = 1; + { + var error = $root.google.bigtable.v2.ProtoFormat.verify(message.protoFormat); if (error) - return "rowRanges." + error; + return "protoFormat." + error; + } + } + if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) + return "resumeToken: buffer expected"; + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.params[key[i]]); + if (error) + return "params." + error; } } return null; }; /** - * Creates a RowSet message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteQueryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.RowSet + * @memberof google.bigtable.v2.ExecuteQueryRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.RowSet} RowSet + * @returns {google.bigtable.v2.ExecuteQueryRequest} ExecuteQueryRequest */ - RowSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.RowSet) + ExecuteQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.ExecuteQueryRequest) return object; - 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 (typeof object.rowRanges[i] !== "object") - throw TypeError(".google.bigtable.v2.RowSet.rowRanges: object expected"); - message.rowRanges[i] = $root.google.bigtable.v2.RowRange.fromObject(object.rowRanges[i]); + 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.protoFormat != null) { + if (typeof object.protoFormat !== "object") + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.protoFormat: object expected"); + message.protoFormat = $root.google.bigtable.v2.ProtoFormat.fromObject(object.protoFormat); + } + 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 (typeof object.params !== "object") + 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 (typeof object.params[keys[i]] !== "object") + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.params: object expected"); + message.params[keys[i]] = $root.google.bigtable.v2.Value.fromObject(object.params[keys[i]]); } } return message; }; /** - * Creates a plain object from a RowSet message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteQueryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.RowSet + * @memberof google.bigtable.v2.ExecuteQueryRequest * @static - * @param {google.bigtable.v2.RowSet} message RowSet + * @param {google.bigtable.v2.ExecuteQueryRequest} message ExecuteQueryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowSet.toObject = function toObject(message, options) { + ExecuteQueryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.rowKeys = []; - object.rowRanges = []; + if (options.objects || options.defaults) + object.params = {}; + 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 (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.instanceName != null && message.hasOwnProperty("instanceName")) + object.instanceName = message.instanceName; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { + object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options); + if (options.oneofs) + object.dataFormat = "protoFormat"; } - 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); + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = $root.google.bigtable.v2.Value.toObject(message.params[keys2[j]], options); } + if (message.resumeToken != null && message.hasOwnProperty("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; return object; }; /** - * Converts this RowSet to JSON. + * Converts this ExecuteQueryRequest to JSON. * @function toJSON - * @memberof google.bigtable.v2.RowSet + * @memberof google.bigtable.v2.ExecuteQueryRequest * @instance * @returns {Object.} JSON object */ - RowSet.prototype.toJSON = function toJSON() { + ExecuteQueryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RowSet + * Gets the default type url for ExecuteQueryRequest * @function getTypeUrl - * @memberof google.bigtable.v2.RowSet + * @memberof google.bigtable.v2.ExecuteQueryRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RowSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.RowSet"; + return typeUrlPrefix + "/google.bigtable.v2.ExecuteQueryRequest"; }; - return RowSet; + return ExecuteQueryRequest; })(); - v2.ColumnRange = (function() { + v2.ExecuteQueryResponse = (function() { /** - * Properties of a ColumnRange. + * Properties of an ExecuteQueryResponse. * @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 + * @interface IExecuteQueryResponse + * @property {google.bigtable.v2.IResultSetMetadata|null} [metadata] ExecuteQueryResponse metadata + * @property {google.bigtable.v2.IPartialResultSet|null} [results] ExecuteQueryResponse results */ /** - * Constructs a new ColumnRange. + * Constructs a new ExecuteQueryResponse. * @memberof google.bigtable.v2 - * @classdesc Represents a ColumnRange. - * @implements IColumnRange + * @classdesc Represents an ExecuteQueryResponse. + * @implements IExecuteQueryResponse * @constructor - * @param {google.bigtable.v2.IColumnRange=} [properties] Properties to set + * @param {google.bigtable.v2.IExecuteQueryResponse=} [properties] Properties to set */ - function ColumnRange(properties) { + function ExecuteQueryResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42154,156 +43602,103 @@ } /** - * 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 + * ExecuteQueryResponse metadata. + * @member {google.bigtable.v2.IResultSetMetadata|null|undefined} metadata + * @memberof google.bigtable.v2.ExecuteQueryResponse * @instance */ - ColumnRange.prototype.endQualifierClosed = null; + ExecuteQueryResponse.prototype.metadata = null; /** - * ColumnRange endQualifierOpen. - * @member {Uint8Array|null|undefined} endQualifierOpen - * @memberof google.bigtable.v2.ColumnRange + * ExecuteQueryResponse results. + * @member {google.bigtable.v2.IPartialResultSet|null|undefined} results + * @memberof google.bigtable.v2.ExecuteQueryResponse * @instance */ - ColumnRange.prototype.endQualifierOpen = null; + ExecuteQueryResponse.prototype.results = 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 + * ExecuteQueryResponse response. + * @member {"metadata"|"results"|undefined} response + * @memberof google.bigtable.v2.ExecuteQueryResponse * @instance */ - Object.defineProperty(ColumnRange.prototype, "endQualifier", { - get: $util.oneOfGetter($oneOfFields = ["endQualifierClosed", "endQualifierOpen"]), + Object.defineProperty(ExecuteQueryResponse.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["metadata", "results"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ColumnRange instance using the specified properties. + * Creates a new ExecuteQueryResponse instance using the specified properties. * @function create - * @memberof google.bigtable.v2.ColumnRange + * @memberof google.bigtable.v2.ExecuteQueryResponse * @static - * @param {google.bigtable.v2.IColumnRange=} [properties] Properties to set - * @returns {google.bigtable.v2.ColumnRange} ColumnRange instance + * @param {google.bigtable.v2.IExecuteQueryResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.ExecuteQueryResponse} ExecuteQueryResponse instance */ - ColumnRange.create = function create(properties) { - return new ColumnRange(properties); + ExecuteQueryResponse.create = function create(properties) { + return new ExecuteQueryResponse(properties); }; /** - * Encodes the specified ColumnRange message. Does not implicitly {@link google.bigtable.v2.ColumnRange.verify|verify} messages. + * Encodes the specified ExecuteQueryResponse message. Does not implicitly {@link google.bigtable.v2.ExecuteQueryResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.ColumnRange + * @memberof google.bigtable.v2.ExecuteQueryResponse * @static - * @param {google.bigtable.v2.IColumnRange} message ColumnRange message or plain object to encode + * @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 */ - ColumnRange.encode = function encode(message, writer) { + ExecuteQueryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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); + 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()).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()).ldelim(); return writer; }; /** - * Encodes the specified ColumnRange message, length delimited. Does not implicitly {@link google.bigtable.v2.ColumnRange.verify|verify} messages. + * Encodes the specified ExecuteQueryResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ExecuteQueryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.ColumnRange + * @memberof google.bigtable.v2.ExecuteQueryResponse * @static - * @param {google.bigtable.v2.IColumnRange} message ColumnRange message or plain object to encode + * @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 */ - ColumnRange.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ColumnRange message from the specified reader or buffer. + * Decodes an ExecuteQueryResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.ColumnRange + * @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.ColumnRange} ColumnRange + * @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 */ - ColumnRange.decode = function decode(reader, length) { + ExecuteQueryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ExecuteQueryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.familyName = reader.string(); + message.metadata = $root.google.bigtable.v2.ResultSetMetadata.decode(reader, reader.uint32()); 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(); + message.results = $root.google.bigtable.v2.PartialResultSet.decode(reader, reader.uint32()); break; } default: @@ -42315,188 +43710,154 @@ }; /** - * Decodes a ColumnRange message from the specified reader or buffer, length delimited. + * Decodes an ExecuteQueryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.ColumnRange + * @memberof google.bigtable.v2.ExecuteQueryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.ColumnRange} ColumnRange + * @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 */ - ColumnRange.decodeDelimited = function decodeDelimited(reader) { + ExecuteQueryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ColumnRange message. + * Verifies an ExecuteQueryResponse message. * @function verify - * @memberof google.bigtable.v2.ColumnRange + * @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 */ - ColumnRange.verify = function verify(message) { + ExecuteQueryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.startQualifierClosed != null && message.hasOwnProperty("startQualifierClosed")) { - properties.startQualifier = 1; - if (!(message.startQualifierClosed && typeof message.startQualifierClosed.length === "number" || $util.isString(message.startQualifierClosed))) - return "startQualifierClosed: buffer expected"; - } - if (message.startQualifierOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endQualifierClosed")) { - properties.endQualifier = 1; - if (!(message.endQualifierClosed && typeof message.endQualifierClosed.length === "number" || $util.isString(message.endQualifierClosed))) - return "endQualifierClosed: buffer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties.response = 1; + { + var error = $root.google.bigtable.v2.ResultSetMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } } - if (message.endQualifierOpen != null && message.hasOwnProperty("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"; + if (message.results != null && message.hasOwnProperty("results")) { + if (properties.response === 1) + return "response: multiple values"; + properties.response = 1; + { + var error = $root.google.bigtable.v2.PartialResultSet.verify(message.results); + if (error) + return "results." + error; + } } return null; }; /** - * Creates a ColumnRange message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteQueryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.ColumnRange + * @memberof google.bigtable.v2.ExecuteQueryResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.ColumnRange} ColumnRange + * @returns {google.bigtable.v2.ExecuteQueryResponse} ExecuteQueryResponse */ - ColumnRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.ColumnRange) + ExecuteQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.ExecuteQueryResponse) return object; - 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; + var message = new $root.google.bigtable.v2.ExecuteQueryResponse(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.metadata: object expected"); + message.metadata = $root.google.bigtable.v2.ResultSetMetadata.fromObject(object.metadata); + } + if (object.results != null) { + if (typeof object.results !== "object") + throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.results: object expected"); + message.results = $root.google.bigtable.v2.PartialResultSet.fromObject(object.results); + } return message; }; /** - * Creates a plain object from a ColumnRange message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteQueryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.ColumnRange + * @memberof google.bigtable.v2.ExecuteQueryResponse * @static - * @param {google.bigtable.v2.ColumnRange} message ColumnRange + * @param {google.bigtable.v2.ExecuteQueryResponse} message ExecuteQueryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ColumnRange.toObject = function toObject(message, options) { + ExecuteQueryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.familyName = ""; - if (message.familyName != null && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.startQualifierClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options); if (options.oneofs) - object.endQualifier = "endQualifierClosed"; + object.response = "metadata"; } - if (message.endQualifierOpen != null && message.hasOwnProperty("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 (message.results != null && message.hasOwnProperty("results")) { + object.results = $root.google.bigtable.v2.PartialResultSet.toObject(message.results, options); if (options.oneofs) - object.endQualifier = "endQualifierOpen"; + object.response = "results"; } return object; }; /** - * Converts this ColumnRange to JSON. + * Converts this ExecuteQueryResponse to JSON. * @function toJSON - * @memberof google.bigtable.v2.ColumnRange + * @memberof google.bigtable.v2.ExecuteQueryResponse * @instance * @returns {Object.} JSON object */ - ColumnRange.prototype.toJSON = function toJSON() { + ExecuteQueryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ColumnRange + * Gets the default type url for ExecuteQueryResponse * @function getTypeUrl - * @memberof google.bigtable.v2.ColumnRange + * @memberof google.bigtable.v2.ExecuteQueryResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ColumnRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.ColumnRange"; + return typeUrlPrefix + "/google.bigtable.v2.ExecuteQueryResponse"; }; - return ColumnRange; + return ExecuteQueryResponse; })(); - v2.TimestampRange = (function() { + v2.Row = (function() { /** - * Properties of a TimestampRange. + * Properties of a Row. * @memberof google.bigtable.v2 - * @interface ITimestampRange - * @property {number|Long|null} [startTimestampMicros] TimestampRange startTimestampMicros - * @property {number|Long|null} [endTimestampMicros] TimestampRange endTimestampMicros + * @interface IRow + * @property {Uint8Array|null} [key] Row key + * @property {Array.|null} [families] Row families */ /** - * Constructs a new TimestampRange. + * Constructs a new Row. * @memberof google.bigtable.v2 - * @classdesc Represents a TimestampRange. - * @implements ITimestampRange + * @classdesc Represents a Row. + * @implements IRow * @constructor - * @param {google.bigtable.v2.ITimestampRange=} [properties] Properties to set + * @param {google.bigtable.v2.IRow=} [properties] Properties to set */ - function TimestampRange(properties) { + function Row(properties) { + this.families = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42504,89 +43865,92 @@ } /** - * TimestampRange startTimestampMicros. - * @member {number|Long} startTimestampMicros - * @memberof google.bigtable.v2.TimestampRange + * Row key. + * @member {Uint8Array} key + * @memberof google.bigtable.v2.Row * @instance */ - TimestampRange.prototype.startTimestampMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Row.prototype.key = $util.newBuffer([]); /** - * TimestampRange endTimestampMicros. - * @member {number|Long} endTimestampMicros - * @memberof google.bigtable.v2.TimestampRange + * Row families. + * @member {Array.} families + * @memberof google.bigtable.v2.Row * @instance */ - TimestampRange.prototype.endTimestampMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Row.prototype.families = $util.emptyArray; /** - * Creates a new TimestampRange instance using the specified properties. + * Creates a new Row instance using the specified properties. * @function create - * @memberof google.bigtable.v2.TimestampRange + * @memberof google.bigtable.v2.Row * @static - * @param {google.bigtable.v2.ITimestampRange=} [properties] Properties to set - * @returns {google.bigtable.v2.TimestampRange} TimestampRange instance + * @param {google.bigtable.v2.IRow=} [properties] Properties to set + * @returns {google.bigtable.v2.Row} Row instance */ - TimestampRange.create = function create(properties) { - return new TimestampRange(properties); + Row.create = function create(properties) { + return new Row(properties); }; /** - * Encodes the specified TimestampRange message. Does not implicitly {@link google.bigtable.v2.TimestampRange.verify|verify} messages. + * Encodes the specified Row message. Does not implicitly {@link google.bigtable.v2.Row.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.TimestampRange + * @memberof google.bigtable.v2.Row * @static - * @param {google.bigtable.v2.ITimestampRange} message TimestampRange message or plain object to encode + * @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 */ - TimestampRange.encode = function encode(message, writer) { + Row.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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); + 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()).ldelim(); return writer; }; /** - * Encodes the specified TimestampRange message, length delimited. Does not implicitly {@link google.bigtable.v2.TimestampRange.verify|verify} messages. + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.bigtable.v2.Row.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.TimestampRange + * @memberof google.bigtable.v2.Row * @static - * @param {google.bigtable.v2.ITimestampRange} message TimestampRange message or plain object to encode + * @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 */ - TimestampRange.encodeDelimited = function encodeDelimited(message, writer) { + Row.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimestampRange message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.TimestampRange + * @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.TimestampRange} TimestampRange + * @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 */ - TimestampRange.decode = function decode(reader, length) { + Row.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.TimestampRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Row(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.startTimestampMicros = reader.int64(); + message.key = reader.bytes(); break; } case 2: { - message.endTimestampMicros = reader.int64(); + if (!(message.families && message.families.length)) + message.families = []; + message.families.push($root.google.bigtable.v2.Family.decode(reader, reader.uint32())); break; } default: @@ -42598,162 +43962,159 @@ }; /** - * Decodes a TimestampRange message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.TimestampRange + * @memberof google.bigtable.v2.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.TimestampRange} TimestampRange + * @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 */ - TimestampRange.decodeDelimited = function decodeDelimited(reader) { + Row.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimestampRange message. + * Verifies a Row message. * @function verify - * @memberof google.bigtable.v2.TimestampRange + * @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 */ - TimestampRange.verify = function verify(message) { + Row.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTimestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("endTimestampMicros")) - if (!$util.isInteger(message.endTimestampMicros) && !(message.endTimestampMicros && $util.isInteger(message.endTimestampMicros.low) && $util.isInteger(message.endTimestampMicros.high))) - return "endTimestampMicros: integer|Long expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.families != null && message.hasOwnProperty("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]); + if (error) + return "families." + error; + } + } return null; }; /** - * Creates a TimestampRange message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.TimestampRange + * @memberof google.bigtable.v2.Row * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.TimestampRange} TimestampRange + * @returns {google.bigtable.v2.Row} Row */ - TimestampRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.TimestampRange) + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Row) return object; - var message = new $root.google.bigtable.v2.TimestampRange(); - if (object.startTimestampMicros != null) - if ($util.Long) - (message.startTimestampMicros = $util.Long.fromValue(object.startTimestampMicros)).unsigned = 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)).unsigned = 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(); + 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 (typeof object.families[i] !== "object") + throw TypeError(".google.bigtable.v2.Row.families: object expected"); + message.families[i] = $root.google.bigtable.v2.Family.fromObject(object.families[i]); + } + } return message; }; /** - * Creates a plain object from a TimestampRange message. Also converts values to other types if specified. + * Creates a plain object from a Row message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.TimestampRange + * @memberof google.bigtable.v2.Row * @static - * @param {google.bigtable.v2.TimestampRange} message TimestampRange + * @param {google.bigtable.v2.Row} message Row * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimestampRange.toObject = function toObject(message, options) { + Row.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTimestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startTimestampMicros = options.longs === String ? "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() : long; - } else - object.endTimestampMicros = options.longs === String ? "0" : 0; + 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 && message.hasOwnProperty("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); } - if (message.startTimestampMicros != null && message.hasOwnProperty("startTimestampMicros")) - 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 && message.hasOwnProperty("endTimestampMicros")) - 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. + * Converts this Row to JSON. * @function toJSON - * @memberof google.bigtable.v2.TimestampRange + * @memberof google.bigtable.v2.Row * @instance * @returns {Object.} JSON object */ - TimestampRange.prototype.toJSON = function toJSON() { + Row.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TimestampRange + * Gets the default type url for Row * @function getTypeUrl - * @memberof google.bigtable.v2.TimestampRange + * @memberof google.bigtable.v2.Row * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TimestampRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.TimestampRange"; + return typeUrlPrefix + "/google.bigtable.v2.Row"; }; - return TimestampRange; + return Row; })(); - v2.ValueRange = (function() { + v2.Family = (function() { /** - * Properties of a ValueRange. + * Properties of a Family. * @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 + * @interface IFamily + * @property {string|null} [name] Family name + * @property {Array.|null} [columns] Family columns */ /** - * Constructs a new ValueRange. + * Constructs a new Family. * @memberof google.bigtable.v2 - * @classdesc Represents a ValueRange. - * @implements IValueRange + * @classdesc Represents a Family. + * @implements IFamily * @constructor - * @param {google.bigtable.v2.IValueRange=} [properties] Properties to set + * @param {google.bigtable.v2.IFamily=} [properties] Properties to set */ - function ValueRange(properties) { + function Family(properties) { + this.columns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42761,142 +44122,92 @@ } /** - * ValueRange startValueClosed. - * @member {Uint8Array|null|undefined} startValueClosed - * @memberof google.bigtable.v2.ValueRange + * Family name. + * @member {string} name + * @memberof google.bigtable.v2.Family * @instance */ - ValueRange.prototype.startValueClosed = null; + Family.prototype.name = ""; /** - * ValueRange startValueOpen. - * @member {Uint8Array|null|undefined} startValueOpen - * @memberof google.bigtable.v2.ValueRange + * Family columns. + * @member {Array.} columns + * @memberof google.bigtable.v2.Family * @instance */ - ValueRange.prototype.startValueOpen = null; + Family.prototype.columns = $util.emptyArray; /** - * ValueRange endValueClosed. - * @member {Uint8Array|null|undefined} endValueClosed - * @memberof google.bigtable.v2.ValueRange - * @instance + * 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 */ - ValueRange.prototype.endValueClosed = null; + Family.create = function create(properties) { + return new Family(properties); + }; /** - * ValueRange endValueOpen. - * @member {Uint8Array|null|undefined} endValueOpen - * @memberof google.bigtable.v2.ValueRange - * @instance + * 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 */ - 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) { + Family.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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); + 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()).ldelim(); return writer; }; /** - * Encodes the specified ValueRange message, length delimited. Does not implicitly {@link google.bigtable.v2.ValueRange.verify|verify} messages. + * Encodes the specified Family message, length delimited. Does not implicitly {@link google.bigtable.v2.Family.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.ValueRange + * @memberof google.bigtable.v2.Family * @static - * @param {google.bigtable.v2.IValueRange} message ValueRange message or plain object to encode + * @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 */ - ValueRange.encodeDelimited = function encodeDelimited(message, writer) { + Family.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValueRange message from the specified reader or buffer. + * Decodes a Family message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.ValueRange + * @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.ValueRange} ValueRange + * @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 */ - ValueRange.decode = function decode(reader, length) { + Family.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ValueRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Family(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.startValueClosed = reader.bytes(); + message.name = reader.string(); break; } case 2: { - message.startValueOpen = reader.bytes(); - break; - } - case 3: { - message.endValueClosed = reader.bytes(); - break; - } - case 4: { - message.endValueOpen = reader.bytes(); + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.bigtable.v2.Column.decode(reader, reader.uint32())); break; } default: @@ -42908,196 +44219,150 @@ }; /** - * Decodes a ValueRange message from the specified reader or buffer, length delimited. + * Decodes a Family message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.ValueRange + * @memberof google.bigtable.v2.Family * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.ValueRange} ValueRange + * @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 */ - ValueRange.decodeDelimited = function decodeDelimited(reader) { + Family.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValueRange message. + * Verifies a Family message. * @function verify - * @memberof google.bigtable.v2.ValueRange + * @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 */ - ValueRange.verify = function verify(message) { + Family.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.startValueClosed != null && message.hasOwnProperty("startValueClosed")) { - properties.startValue = 1; - if (!(message.startValueClosed && typeof message.startValueClosed.length === "number" || $util.isString(message.startValueClosed))) - return "startValueClosed: buffer expected"; - } - if (message.startValueOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endValueClosed")) { - properties.endValue = 1; - if (!(message.endValueClosed && typeof message.endValueClosed.length === "number" || $util.isString(message.endValueClosed))) - return "endValueClosed: buffer expected"; - } - if (message.endValueOpen != null && message.hasOwnProperty("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"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.bigtable.v2.Column.verify(message.columns[i]); + if (error) + return "columns." + error; + } } return null; }; /** - * Creates a ValueRange message from a plain object. Also converts values to their respective internal types. + * Creates a Family message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.ValueRange + * @memberof google.bigtable.v2.Family * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.ValueRange} ValueRange + * @returns {google.bigtable.v2.Family} Family */ - ValueRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.ValueRange) + Family.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Family) return object; - 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; + 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 (typeof object.columns[i] !== "object") + throw TypeError(".google.bigtable.v2.Family.columns: object expected"); + message.columns[i] = $root.google.bigtable.v2.Column.fromObject(object.columns[i]); + } + } return message; }; /** - * Creates a plain object from a ValueRange message. Also converts values to other types if specified. + * Creates a plain object from a Family message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.ValueRange + * @memberof google.bigtable.v2.Family * @static - * @param {google.bigtable.v2.ValueRange} message ValueRange + * @param {google.bigtable.v2.Family} message Family * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValueRange.toObject = function toObject(message, options) { + Family.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.startValueClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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"; + if (options.arrays || options.defaults) + object.columns = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("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); } return object; }; /** - * Converts this ValueRange to JSON. + * Converts this Family to JSON. * @function toJSON - * @memberof google.bigtable.v2.ValueRange + * @memberof google.bigtable.v2.Family * @instance * @returns {Object.} JSON object */ - ValueRange.prototype.toJSON = function toJSON() { + Family.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValueRange + * Gets the default type url for Family * @function getTypeUrl - * @memberof google.bigtable.v2.ValueRange + * @memberof google.bigtable.v2.Family * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValueRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Family.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.ValueRange"; + return typeUrlPrefix + "/google.bigtable.v2.Family"; }; - return ValueRange; + return Family; })(); - v2.RowFilter = (function() { + v2.Column = (function() { /** - * Properties of a RowFilter. + * Properties of a Column. * @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 + * @interface IColumn + * @property {Uint8Array|null} [qualifier] Column qualifier + * @property {Array.|null} [cells] Column cells */ /** - * Constructs a new RowFilter. + * Constructs a new Column. * @memberof google.bigtable.v2 - * @classdesc Represents a RowFilter. - * @implements IRowFilter + * @classdesc Represents a Column. + * @implements IColumn * @constructor - * @param {google.bigtable.v2.IRowFilter=} [properties] Properties to set + * @param {google.bigtable.v2.IColumn=} [properties] Properties to set */ - function RowFilter(properties) { + function Column(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43105,341 +44370,92 @@ } /** - * 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 + * Column qualifier. + * @member {Uint8Array} qualifier + * @memberof google.bigtable.v2.Column * @instance */ - RowFilter.prototype.applyLabelTransformer = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Column.prototype.qualifier = $util.newBuffer([]); /** - * RowFilter filter. - * @member {"chain"|"interleave"|"condition"|"sink"|"passAllFilter"|"blockAllFilter"|"rowKeyRegexFilter"|"rowSampleFilter"|"familyNameRegexFilter"|"columnQualifierRegexFilter"|"columnRangeFilter"|"timestampRangeFilter"|"valueRegexFilter"|"valueRangeFilter"|"cellsPerRowOffsetFilter"|"cellsPerRowLimitFilter"|"cellsPerColumnLimitFilter"|"stripValueTransformer"|"applyLabelTransformer"|undefined} filter - * @memberof google.bigtable.v2.RowFilter + * Column cells. + * @member {Array.} cells + * @memberof google.bigtable.v2.Column * @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"]), - set: $util.oneOfSetter($oneOfFields) - }); + Column.prototype.cells = $util.emptyArray; /** - * Creates a new RowFilter instance using the specified properties. + * Creates a new Column instance using the specified properties. * @function create - * @memberof google.bigtable.v2.RowFilter + * @memberof google.bigtable.v2.Column * @static - * @param {google.bigtable.v2.IRowFilter=} [properties] Properties to set - * @returns {google.bigtable.v2.RowFilter} RowFilter instance + * @param {google.bigtable.v2.IColumn=} [properties] Properties to set + * @returns {google.bigtable.v2.Column} Column instance */ - RowFilter.create = function create(properties) { - return new RowFilter(properties); + Column.create = function create(properties) { + return new Column(properties); }; /** - * Encodes the specified RowFilter message. Does not implicitly {@link google.bigtable.v2.RowFilter.verify|verify} messages. + * Encodes the specified Column message. Does not implicitly {@link google.bigtable.v2.Column.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.RowFilter + * @memberof google.bigtable.v2.Column * @static - * @param {google.bigtable.v2.IRowFilter} message RowFilter message or plain object to encode + * @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 */ - RowFilter.encode = function encode(message, writer) { + Column.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).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()).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()).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()).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()).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()).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.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()).ldelim(); return writer; }; /** - * Encodes the specified RowFilter message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.verify|verify} messages. + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.bigtable.v2.Column.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.v2.RowFilter + * @memberof google.bigtable.v2.Column * @static - * @param {google.bigtable.v2.IRowFilter} message RowFilter message or plain object to encode + * @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 */ - RowFilter.encodeDelimited = function encodeDelimited(message, writer) { + Column.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RowFilter message from the specified reader or buffer. + * Decodes a Column message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.RowFilter + * @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.RowFilter} RowFilter + * @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 */ - RowFilter.decode = function decode(reader, length) { + Column.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Column(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.chain = $root.google.bigtable.v2.RowFilter.Chain.decode(reader, reader.uint32()); + message.qualifier = reader.bytes(); break; } case 2: { - message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.decode(reader, reader.uint32()); - break; - } - case 3: { - message.condition = $root.google.bigtable.v2.RowFilter.Condition.decode(reader, reader.uint32()); - 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()); - break; - } - case 8: { - message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.decode(reader, reader.uint32()); - break; - } - case 9: { - message.valueRegexFilter = reader.bytes(); - break; - } - case 15: { - message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.decode(reader, reader.uint32()); - 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(); + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push($root.google.bigtable.v2.Cell.decode(reader, reader.uint32())); break; } default: @@ -43451,421 +44467,10786 @@ }; /** - * Decodes a RowFilter message from the specified reader or buffer, length delimited. + * Decodes a Column message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.RowFilter + * @memberof google.bigtable.v2.Column * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.RowFilter} RowFilter + * @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 */ - RowFilter.decodeDelimited = function decodeDelimited(reader) { + Column.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RowFilter message. + * Verifies a Column message. * @function verify - * @memberof google.bigtable.v2.RowFilter + * @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 */ - RowFilter.verify = function verify(message) { + Column.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.chain != null && message.hasOwnProperty("chain")) { - properties.filter = 1; - { - var error = $root.google.bigtable.v2.RowFilter.Chain.verify(message.chain); - if (error) - return "chain." + error; - } - } - if (message.interleave != null && message.hasOwnProperty("interleave")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.RowFilter.Interleave.verify(message.interleave); - if (error) - return "interleave." + error; - } - } - if (message.condition != null && message.hasOwnProperty("condition")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.RowFilter.Condition.verify(message.condition); - if (error) - return "condition." + error; - } - } - if (message.sink != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("columnRangeFilter")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.ColumnRange.verify(message.columnRangeFilter); - if (error) - return "columnRangeFilter." + error; - } - } - if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.TimestampRange.verify(message.timestampRangeFilter); - if (error) - return "timestampRangeFilter." + error; - } - } - if (message.valueRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("valueRangeFilter")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.bigtable.v2.ValueRange.verify(message.valueRangeFilter); + if (message.qualifier != null && message.hasOwnProperty("qualifier")) + if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) + return "qualifier: buffer expected"; + if (message.cells != null && message.hasOwnProperty("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]); if (error) - return "valueRangeFilter." + error; + return "cells." + error; } } - if (message.cellsPerRowOffsetFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("applyLabelTransformer")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - if (!$util.isString(message.applyLabelTransformer)) - return "applyLabelTransformer: string expected"; - } return null; }; /** - * Creates a RowFilter message from a plain object. Also converts values to their respective internal types. + * Creates a Column message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.RowFilter + * @memberof google.bigtable.v2.Column * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.RowFilter} RowFilter + * @returns {google.bigtable.v2.Column} Column */ - RowFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.RowFilter) + Column.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Column) return object; - var message = new $root.google.bigtable.v2.RowFilter(); - if (object.chain != null) { - if (typeof object.chain !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.chain: object expected"); - message.chain = $root.google.bigtable.v2.RowFilter.Chain.fromObject(object.chain); - } - if (object.interleave != null) { - if (typeof object.interleave !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.interleave: object expected"); - message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.fromObject(object.interleave); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.condition: object expected"); - message.condition = $root.google.bigtable.v2.RowFilter.Condition.fromObject(object.condition); - } - 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 (typeof object.columnRangeFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.columnRangeFilter: object expected"); - message.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.fromObject(object.columnRangeFilter); - } - if (object.timestampRangeFilter != null) { - if (typeof object.timestampRangeFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.timestampRangeFilter: object expected"); - message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.fromObject(object.timestampRangeFilter); - } - 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 (typeof object.valueRangeFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.valueRangeFilter: object expected"); - message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.fromObject(object.valueRangeFilter); + 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 (typeof object.cells[i] !== "object") + throw TypeError(".google.bigtable.v2.Column.cells: object expected"); + message.cells[i] = $root.google.bigtable.v2.Cell.fromObject(object.cells[i]); + } } - 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); return message; }; /** - * Creates a plain object from a RowFilter message. Also converts values to other types if specified. + * Creates a plain object from a Column message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.RowFilter + * @memberof google.bigtable.v2.Column * @static - * @param {google.bigtable.v2.RowFilter} message RowFilter + * @param {google.bigtable.v2.Column} message Column * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowFilter.toObject = function toObject(message, options) { + Column.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.chain != null && message.hasOwnProperty("chain")) { - object.chain = $root.google.bigtable.v2.RowFilter.Chain.toObject(message.chain, options); - if (options.oneofs) - object.filter = "chain"; - } - if (message.interleave != null && message.hasOwnProperty("interleave")) { - object.interleave = $root.google.bigtable.v2.RowFilter.Interleave.toObject(message.interleave, options); - if (options.oneofs) - object.filter = "interleave"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - object.condition = $root.google.bigtable.v2.RowFilter.Condition.toObject(message.condition, options); - if (options.oneofs) - object.filter = "condition"; - } - if (message.rowKeyRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("familyNameRegexFilter")) { - object.familyNameRegexFilter = message.familyNameRegexFilter; - if (options.oneofs) - object.filter = "familyNameRegexFilter"; - } - if (message.columnQualifierRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("columnRangeFilter")) { - object.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.toObject(message.columnRangeFilter, options); - if (options.oneofs) - object.filter = "columnRangeFilter"; - } - if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { - object.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.toObject(message.timestampRangeFilter, options); - if (options.oneofs) - object.filter = "timestampRangeFilter"; - } - if (message.valueRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("cellsPerRowOffsetFilter")) { - object.cellsPerRowOffsetFilter = message.cellsPerRowOffsetFilter; - if (options.oneofs) - object.filter = "cellsPerRowOffsetFilter"; - } - if (message.cellsPerRowLimitFilter != null && message.hasOwnProperty("cellsPerRowLimitFilter")) { - object.cellsPerRowLimitFilter = message.cellsPerRowLimitFilter; - if (options.oneofs) - object.filter = "cellsPerRowLimitFilter"; - } - if (message.cellsPerColumnLimitFilter != null && message.hasOwnProperty("cellsPerColumnLimitFilter")) { - object.cellsPerColumnLimitFilter = message.cellsPerColumnLimitFilter; - if (options.oneofs) - object.filter = "cellsPerColumnLimitFilter"; - } - if (message.stripValueTransformer != null && message.hasOwnProperty("stripValueTransformer")) { - object.stripValueTransformer = message.stripValueTransformer; - if (options.oneofs) - object.filter = "stripValueTransformer"; - } - if (message.rowSampleFilter != null && message.hasOwnProperty("rowSampleFilter")) { - object.rowSampleFilter = options.json && !isFinite(message.rowSampleFilter) ? String(message.rowSampleFilter) : message.rowSampleFilter; - if (options.oneofs) - object.filter = "rowSampleFilter"; - } - if (message.valueRangeFilter != null && message.hasOwnProperty("valueRangeFilter")) { - object.valueRangeFilter = $root.google.bigtable.v2.ValueRange.toObject(message.valueRangeFilter, options); - if (options.oneofs) - object.filter = "valueRangeFilter"; - } - if (message.sink != null && message.hasOwnProperty("sink")) { - object.sink = message.sink; - if (options.oneofs) - object.filter = "sink"; - } - if (message.passAllFilter != null && message.hasOwnProperty("passAllFilter")) { - object.passAllFilter = message.passAllFilter; - if (options.oneofs) - object.filter = "passAllFilter"; - } - if (message.blockAllFilter != null && message.hasOwnProperty("blockAllFilter")) { - object.blockAllFilter = message.blockAllFilter; - if (options.oneofs) - object.filter = "blockAllFilter"; - } - if (message.applyLabelTransformer != null && message.hasOwnProperty("applyLabelTransformer")) { - object.applyLabelTransformer = message.applyLabelTransformer; - if (options.oneofs) - object.filter = "applyLabelTransformer"; + 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 && message.hasOwnProperty("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); } return object; }; /** - * Converts this RowFilter to JSON. + * Converts this Column to JSON. * @function toJSON - * @memberof google.bigtable.v2.RowFilter + * @memberof google.bigtable.v2.Column * @instance * @returns {Object.} JSON object */ - RowFilter.prototype.toJSON = function toJSON() { + Column.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"; - }; + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Cell(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) + 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) { + if (object instanceof $root.google.bigtable.v2.Cell) + return object; + var message = new $root.google.bigtable.v2.Cell(); + if (object.timestampMicros != null) + if ($util.Long) + (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("timestampMicros")) + 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 && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + 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()); + break; + } + case 13: { + message.dateValue = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 4: { + message.arrayValue = $root.google.bigtable.v2.ArrayValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type); + if (error) + return "type." + error; + } + if (message.rawValue != null && message.hasOwnProperty("rawValue")) { + properties.kind = 1; + if (!(message.rawValue && typeof message.rawValue.length === "number" || $util.isString(message.rawValue))) + return "rawValue: buffer expected"; + } + if (message.rawTimestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.intValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.floatValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("timestampValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); + if (error) + return "timestampValue." + error; + } + } + if (message.dateValue != null && message.hasOwnProperty("dateValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.type.Date.verify(message.dateValue); + if (error) + return "dateValue." + error; + } + } + if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.ArrayValue.verify(message.arrayValue); + 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) { + if (object instanceof $root.google.bigtable.v2.Value) + return object; + var message = new $root.google.bigtable.v2.Value(); + if (object.type != null) { + if (typeof object.type !== "object") + throw TypeError(".google.bigtable.v2.Value.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type); + } + 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)).unsigned = 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)).unsigned = 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 (typeof object.timestampValue !== "object") + throw TypeError(".google.bigtable.v2.Value.timestampValue: object expected"); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); + } + if (object.dateValue != null) { + if (typeof object.dateValue !== "object") + throw TypeError(".google.bigtable.v2.Value.dateValue: object expected"); + message.dateValue = $root.google.type.Date.fromObject(object.dateValue); + } + if (object.arrayValue != null) { + if (typeof object.arrayValue !== "object") + throw TypeError(".google.bigtable.v2.Value.arrayValue: object expected"); + message.arrayValue = $root.google.bigtable.v2.ArrayValue.fromObject(object.arrayValue); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = null; + if (message.bytesValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + object.arrayValue = $root.google.bigtable.v2.ArrayValue.toObject(message.arrayValue, options); + if (options.oneofs) + object.kind = "arrayValue"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + 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 && message.hasOwnProperty("type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); + if (message.rawValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("rawTimestampMicros")) { + 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 && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; + if (options.oneofs) + object.kind = "floatValue"; + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); + if (options.oneofs) + object.kind = "timestampValue"; + } + if (message.dateValue != null && message.hasOwnProperty("dateValue")) { + object.dateValue = $root.google.type.Date.toObject(message.dateValue, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ArrayValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.values[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.ArrayValue) + return object; + 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 (typeof object.values[i] !== "object") + throw TypeError(".google.bigtable.v2.ArrayValue.values: object expected"); + message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.startKeyClosed != null && message.hasOwnProperty("startKeyClosed")) { + properties.startKey = 1; + if (!(message.startKeyClosed && typeof message.startKeyClosed.length === "number" || $util.isString(message.startKeyClosed))) + return "startKeyClosed: buffer expected"; + } + if (message.startKeyOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endKeyOpen")) { + properties.endKey = 1; + if (!(message.endKeyOpen && typeof message.endKeyOpen.length === "number" || $util.isString(message.endKeyOpen))) + return "endKeyOpen: buffer expected"; + } + if (message.endKeyClosed != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.RowRange) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (message.startKeyClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowKeys != null && message.hasOwnProperty("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 && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.RowSet) + return object; + 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 (typeof object.rowRanges[i] !== "object") + throw TypeError(".google.bigtable.v2.RowSet.rowRanges: object expected"); + message.rowRanges[i] = $root.google.bigtable.v2.RowRange.fromObject(object.rowRanges[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.startQualifierClosed != null && message.hasOwnProperty("startQualifierClosed")) { + properties.startQualifier = 1; + if (!(message.startQualifierClosed && typeof message.startQualifierClosed.length === "number" || $util.isString(message.startQualifierClosed))) + return "startQualifierClosed: buffer expected"; + } + if (message.startQualifierOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endQualifierClosed")) { + properties.endQualifier = 1; + if (!(message.endQualifierClosed && typeof message.endQualifierClosed.length === "number" || $util.isString(message.endQualifierClosed))) + return "endQualifierClosed: buffer expected"; + } + if (message.endQualifierOpen != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ColumnRange) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.familyName = ""; + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.startQualifierClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.TimestampRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTimestampMicros = reader.int64(); + break; + } + case 2: { + message.endTimestampMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTimestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.TimestampRange) + return object; + var message = new $root.google.bigtable.v2.TimestampRange(); + if (object.startTimestampMicros != null) + if ($util.Long) + (message.startTimestampMicros = $util.Long.fromValue(object.startTimestampMicros)).unsigned = 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)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.startTimestampMicros = options.longs === String ? "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() : long; + } else + object.endTimestampMicros = options.longs === String ? "0" : 0; + } + if (message.startTimestampMicros != null && message.hasOwnProperty("startTimestampMicros")) + 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 && message.hasOwnProperty("endTimestampMicros")) + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ValueRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.startValueClosed != null && message.hasOwnProperty("startValueClosed")) { + properties.startValue = 1; + if (!(message.startValueClosed && typeof message.startValueClosed.length === "number" || $util.isString(message.startValueClosed))) + return "startValueClosed: buffer expected"; + } + if (message.startValueOpen != null && message.hasOwnProperty("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 && message.hasOwnProperty("endValueClosed")) { + properties.endValue = 1; + if (!(message.endValueClosed && typeof message.endValueClosed.length === "number" || $util.isString(message.endValueClosed))) + return "endValueClosed: buffer expected"; + } + if (message.endValueOpen != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ValueRange) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (message.startValueClosed != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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.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 + */ + + /** + * 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) + 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; + + // 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"|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"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.chain = $root.google.bigtable.v2.RowFilter.Chain.decode(reader, reader.uint32()); + break; + } + case 2: { + message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.decode(reader, reader.uint32()); + break; + } + case 3: { + message.condition = $root.google.bigtable.v2.RowFilter.Condition.decode(reader, reader.uint32()); + 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()); + break; + } + case 8: { + message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.decode(reader, reader.uint32()); + break; + } + case 9: { + message.valueRegexFilter = reader.bytes(); + break; + } + case 15: { + message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.decode(reader, reader.uint32()); + 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; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.chain != null && message.hasOwnProperty("chain")) { + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Chain.verify(message.chain); + if (error) + return "chain." + error; + } + } + if (message.interleave != null && message.hasOwnProperty("interleave")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Interleave.verify(message.interleave); + if (error) + return "interleave." + error; + } + } + if (message.condition != null && message.hasOwnProperty("condition")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Condition.verify(message.condition); + if (error) + return "condition." + error; + } + } + if (message.sink != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("columnRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.ColumnRange.verify(message.columnRangeFilter); + if (error) + return "columnRangeFilter." + error; + } + } + if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.TimestampRange.verify(message.timestampRangeFilter); + if (error) + return "timestampRangeFilter." + error; + } + } + if (message.valueRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("valueRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.ValueRange.verify(message.valueRangeFilter); + if (error) + return "valueRangeFilter." + error; + } + } + if (message.cellsPerRowOffsetFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("applyLabelTransformer")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.applyLabelTransformer)) + return "applyLabelTransformer: string expected"; + } + 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) { + if (object instanceof $root.google.bigtable.v2.RowFilter) + return object; + var message = new $root.google.bigtable.v2.RowFilter(); + if (object.chain != null) { + if (typeof object.chain !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.chain: object expected"); + message.chain = $root.google.bigtable.v2.RowFilter.Chain.fromObject(object.chain); + } + if (object.interleave != null) { + if (typeof object.interleave !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.interleave: object expected"); + message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.fromObject(object.interleave); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.condition: object expected"); + message.condition = $root.google.bigtable.v2.RowFilter.Condition.fromObject(object.condition); + } + 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 (typeof object.columnRangeFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.columnRangeFilter: object expected"); + message.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.fromObject(object.columnRangeFilter); + } + if (object.timestampRangeFilter != null) { + if (typeof object.timestampRangeFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.timestampRangeFilter: object expected"); + message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.fromObject(object.timestampRangeFilter); + } + 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 (typeof object.valueRangeFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.valueRangeFilter: object expected"); + message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.fromObject(object.valueRangeFilter); + } + 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); + 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) { + if (!options) + options = {}; + var object = {}; + if (message.chain != null && message.hasOwnProperty("chain")) { + object.chain = $root.google.bigtable.v2.RowFilter.Chain.toObject(message.chain, options); + if (options.oneofs) + object.filter = "chain"; + } + if (message.interleave != null && message.hasOwnProperty("interleave")) { + object.interleave = $root.google.bigtable.v2.RowFilter.Interleave.toObject(message.interleave, options); + if (options.oneofs) + object.filter = "interleave"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + object.condition = $root.google.bigtable.v2.RowFilter.Condition.toObject(message.condition, options); + if (options.oneofs) + object.filter = "condition"; + } + if (message.rowKeyRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("familyNameRegexFilter")) { + object.familyNameRegexFilter = message.familyNameRegexFilter; + if (options.oneofs) + object.filter = "familyNameRegexFilter"; + } + if (message.columnQualifierRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("columnRangeFilter")) { + object.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.toObject(message.columnRangeFilter, options); + if (options.oneofs) + object.filter = "columnRangeFilter"; + } + if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { + object.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.toObject(message.timestampRangeFilter, options); + if (options.oneofs) + object.filter = "timestampRangeFilter"; + } + if (message.valueRegexFilter != null && message.hasOwnProperty("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 && message.hasOwnProperty("cellsPerRowOffsetFilter")) { + object.cellsPerRowOffsetFilter = message.cellsPerRowOffsetFilter; + if (options.oneofs) + object.filter = "cellsPerRowOffsetFilter"; + } + if (message.cellsPerRowLimitFilter != null && message.hasOwnProperty("cellsPerRowLimitFilter")) { + object.cellsPerRowLimitFilter = message.cellsPerRowLimitFilter; + if (options.oneofs) + object.filter = "cellsPerRowLimitFilter"; + } + if (message.cellsPerColumnLimitFilter != null && message.hasOwnProperty("cellsPerColumnLimitFilter")) { + object.cellsPerColumnLimitFilter = message.cellsPerColumnLimitFilter; + if (options.oneofs) + object.filter = "cellsPerColumnLimitFilter"; + } + if (message.stripValueTransformer != null && message.hasOwnProperty("stripValueTransformer")) { + object.stripValueTransformer = message.stripValueTransformer; + if (options.oneofs) + object.filter = "stripValueTransformer"; + } + if (message.rowSampleFilter != null && message.hasOwnProperty("rowSampleFilter")) { + object.rowSampleFilter = options.json && !isFinite(message.rowSampleFilter) ? String(message.rowSampleFilter) : message.rowSampleFilter; + if (options.oneofs) + object.filter = "rowSampleFilter"; + } + if (message.valueRangeFilter != null && message.hasOwnProperty("valueRangeFilter")) { + object.valueRangeFilter = $root.google.bigtable.v2.ValueRange.toObject(message.valueRangeFilter, options); + if (options.oneofs) + object.filter = "valueRangeFilter"; + } + if (message.sink != null && message.hasOwnProperty("sink")) { + object.sink = message.sink; + if (options.oneofs) + object.filter = "sink"; + } + if (message.passAllFilter != null && message.hasOwnProperty("passAllFilter")) { + object.passAllFilter = message.passAllFilter; + if (options.oneofs) + object.filter = "passAllFilter"; + } + if (message.blockAllFilter != null && message.hasOwnProperty("blockAllFilter")) { + object.blockAllFilter = message.blockAllFilter; + if (options.oneofs) + object.filter = "blockAllFilter"; + } + if (message.applyLabelTransformer != null && message.hasOwnProperty("applyLabelTransformer")) { + object.applyLabelTransformer = message.applyLabelTransformer; + if (options.oneofs) + object.filter = "applyLabelTransformer"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Chain) + return object; + 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 (typeof object.filters[i] !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Chain.filters: object expected"); + message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Interleave) + return object; + 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 (typeof object.filters[i] !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Interleave.filters: object expected"); + message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.predicateFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); + break; + } + case 2: { + message.trueFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.falseFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter); + if (error) + return "predicateFilter." + error; + } + if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.trueFilter); + if (error) + return "trueFilter." + error; + } + if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.falseFilter); + 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) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Condition) + return object; + var message = new $root.google.bigtable.v2.RowFilter.Condition(); + if (object.predicateFilter != null) { + if (typeof object.predicateFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Condition.predicateFilter: object expected"); + message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter); + } + if (object.trueFilter != null) { + if (typeof object.trueFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Condition.trueFilter: object expected"); + message.trueFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.trueFilter); + } + if (object.falseFilter != null) { + if (typeof object.falseFilter !== "object") + throw TypeError(".google.bigtable.v2.RowFilter.Condition.falseFilter: object expected"); + message.falseFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.falseFilter); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.predicateFilter = null; + object.trueFilter = null; + object.falseFilter = null; + } + if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) + object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); + if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) + object.trueFilter = $root.google.bigtable.v2.RowFilter.toObject(message.trueFilter, options); + if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) + object.falseFilter = $root.google.bigtable.v2.RowFilter.toObject(message.falseFilter, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.setCell = $root.google.bigtable.v2.Mutation.SetCell.decode(reader, reader.uint32()); + break; + } + case 5: { + message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.decode(reader, reader.uint32()); + break; + } + case 6: { + message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.decode(reader, reader.uint32()); + break; + } + case 2: { + message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.decode(reader, reader.uint32()); + break; + } + case 3: { + message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.setCell != null && message.hasOwnProperty("setCell")) { + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.SetCell.verify(message.setCell); + if (error) + return "setCell." + error; + } + } + if (message.addToCell != null && message.hasOwnProperty("addToCell")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.AddToCell.verify(message.addToCell); + if (error) + return "addToCell." + error; + } + } + if (message.mergeToCell != null && message.hasOwnProperty("mergeToCell")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.MergeToCell.verify(message.mergeToCell); + if (error) + return "mergeToCell." + error; + } + } + if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromColumn.verify(message.deleteFromColumn); + if (error) + return "deleteFromColumn." + error; + } + } + if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromFamily.verify(message.deleteFromFamily); + if (error) + return "deleteFromFamily." + error; + } + } + if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromRow.verify(message.deleteFromRow); + 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) { + if (object instanceof $root.google.bigtable.v2.Mutation) + return object; + var message = new $root.google.bigtable.v2.Mutation(); + if (object.setCell != null) { + if (typeof object.setCell !== "object") + throw TypeError(".google.bigtable.v2.Mutation.setCell: object expected"); + message.setCell = $root.google.bigtable.v2.Mutation.SetCell.fromObject(object.setCell); + } + if (object.addToCell != null) { + if (typeof object.addToCell !== "object") + throw TypeError(".google.bigtable.v2.Mutation.addToCell: object expected"); + message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.fromObject(object.addToCell); + } + if (object.mergeToCell != null) { + if (typeof object.mergeToCell !== "object") + throw TypeError(".google.bigtable.v2.Mutation.mergeToCell: object expected"); + message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.fromObject(object.mergeToCell); + } + if (object.deleteFromColumn != null) { + if (typeof object.deleteFromColumn !== "object") + throw TypeError(".google.bigtable.v2.Mutation.deleteFromColumn: object expected"); + message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.fromObject(object.deleteFromColumn); + } + if (object.deleteFromFamily != null) { + if (typeof object.deleteFromFamily !== "object") + throw TypeError(".google.bigtable.v2.Mutation.deleteFromFamily: object expected"); + message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.fromObject(object.deleteFromFamily); + } + if (object.deleteFromRow != null) { + if (typeof object.deleteFromRow !== "object") + throw TypeError(".google.bigtable.v2.Mutation.deleteFromRow: object expected"); + message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.fromObject(object.deleteFromRow); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.setCell != null && message.hasOwnProperty("setCell")) { + object.setCell = $root.google.bigtable.v2.Mutation.SetCell.toObject(message.setCell, options); + if (options.oneofs) + object.mutation = "setCell"; + } + if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { + object.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.toObject(message.deleteFromColumn, options); + if (options.oneofs) + object.mutation = "deleteFromColumn"; + } + if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { + object.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.toObject(message.deleteFromFamily, options); + if (options.oneofs) + object.mutation = "deleteFromFamily"; + } + if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { + object.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.toObject(message.deleteFromRow, options); + if (options.oneofs) + object.mutation = "deleteFromRow"; + } + if (message.addToCell != null && message.hasOwnProperty("addToCell")) { + object.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.toObject(message.addToCell, options); + if (options.oneofs) + object.mutation = "addToCell"; + } + if (message.mergeToCell != null && message.hasOwnProperty("mergeToCell")) { + object.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.toObject(message.mergeToCell, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.Mutation.SetCell) + return object; + 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)).unsigned = 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) { + if (!options) + options = {}; + 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() : long; + } else + object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("timestampMicros")) + 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 && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 3: { + message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { + var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier); + if (error) + return "columnQualifier." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.bigtable.v2.Value.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.bigtable.v2.Value.verify(message.input); + 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) { + if (object instanceof $root.google.bigtable.v2.Mutation.AddToCell) + return object; + var message = new $root.google.bigtable.v2.Mutation.AddToCell(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) { + if (typeof object.columnQualifier !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.columnQualifier: object expected"); + message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.timestamp: object expected"); + message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp); + } + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.input: object expected"); + message.input = $root.google.bigtable.v2.Value.fromObject(object.input); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.familyName = ""; + object.columnQualifier = null; + object.timestamp = null; + object.input = null; + } + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 3: { + message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { + var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier); + if (error) + return "columnQualifier." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.bigtable.v2.Value.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.bigtable.v2.Value.verify(message.input); + 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) { + if (object instanceof $root.google.bigtable.v2.Mutation.MergeToCell) + return object; + var message = new $root.google.bigtable.v2.Mutation.MergeToCell(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) { + if (typeof object.columnQualifier !== "object") + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.columnQualifier: object expected"); + message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.timestamp: object expected"); + message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp); + } + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.input: object expected"); + message.input = $root.google.bigtable.v2.Value.fromObject(object.input); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.familyName = ""; + object.columnQualifier = null; + object.timestamp = null; + object.input = null; + } + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.timeRange != null && message.hasOwnProperty("timeRange")) { + var error = $root.google.bigtable.v2.TimestampRange.verify(message.timeRange); + 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) { + if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromColumn) + return object; + 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 (typeof object.timeRange !== "object") + throw TypeError(".google.bigtable.v2.Mutation.DeleteFromColumn.timeRange: object expected"); + message.timeRange = $root.google.bigtable.v2.TimestampRange.fromObject(object.timeRange); + } + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("timeRange")) + object.timeRange = $root.google.bigtable.v2.TimestampRange.toObject(message.timeRange, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromFamily) + return object; + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.familyName = ""; + if (message.familyName != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.appendValue != null && message.hasOwnProperty("appendValue")) { + properties.rule = 1; + if (!(message.appendValue && typeof message.appendValue.length === "number" || $util.isString(message.appendValue))) + return "appendValue: buffer expected"; + } + if (message.incrementAmount != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRule) + return object; + 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)).unsigned = 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("incrementAmount")) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamPartition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowRange = $root.google.bigtable.v2.RowRange.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowRange != null && message.hasOwnProperty("rowRange")) { + var error = $root.google.bigtable.v2.RowRange.verify(message.rowRange); + 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) { + if (object instanceof $root.google.bigtable.v2.StreamPartition) + return object; + var message = new $root.google.bigtable.v2.StreamPartition(); + if (object.rowRange != null) { + if (typeof object.rowRange !== "object") + throw TypeError(".google.bigtable.v2.StreamPartition.rowRange: object expected"); + message.rowRange = $root.google.bigtable.v2.RowRange.fromObject(object.rowRange); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.rowRange = null; + if (message.rowRange != null && message.hasOwnProperty("rowRange")) + object.rowRange = $root.google.bigtable.v2.RowRange.toObject(message.rowRange, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationTokens(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokens != null && message.hasOwnProperty("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]); + 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) { + if (object instanceof $root.google.bigtable.v2.StreamContinuationTokens) + return object; + 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 (typeof object.tokens[i] !== "object") + throw TypeError(".google.bigtable.v2.StreamContinuationTokens.tokens: object expected"); + message.tokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.tokens[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationToken(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); + break; + } + case 2: { + message.token = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); + if (error) + return "partition." + error; + } + if (message.token != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.StreamContinuationToken) + return object; + var message = new $root.google.bigtable.v2.StreamContinuationToken(); + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.bigtable.v2.StreamContinuationToken.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.partition = null; + object.token = ""; + } + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); + if (message.token != null && message.hasOwnProperty("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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type); + 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) { + if (object instanceof $root.google.bigtable.v2.ColumnMetadata) + return object; + var message = new $root.google.bigtable.v2.ColumnMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) { + if (typeof object.type !== "object") + throw TypeError(".google.bigtable.v2.ColumnMetadata.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.bigtable.v2.ColumnMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.bigtable.v2.ColumnMetadata.verify(message.columns[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.ProtoSchema) + return object; + 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 (typeof object.columns[i] !== "object") + throw TypeError(".google.bigtable.v2.ProtoSchema.columns: object expected"); + message.columns[i] = $root.google.bigtable.v2.ColumnMetadata.fromObject(object.columns[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ResultSetMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.protoSchema = $root.google.bigtable.v2.ProtoSchema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { + properties.schema = 1; + { + var error = $root.google.bigtable.v2.ProtoSchema.verify(message.protoSchema); + 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) { + if (object instanceof $root.google.bigtable.v2.ResultSetMetadata) + return object; + var message = new $root.google.bigtable.v2.ResultSetMetadata(); + if (object.protoSchema != null) { + if (typeof object.protoSchema !== "object") + throw TypeError(".google.bigtable.v2.ResultSetMetadata.protoSchema: object expected"); + message.protoSchema = $root.google.bigtable.v2.ProtoSchema.fromObject(object.protoSchema); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { + object.protoSchema = $root.google.bigtable.v2.ProtoSchema.toObject(message.protoSchema, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoRows(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.values[i]); + 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) { + if (object instanceof $root.google.bigtable.v2.ProtoRows) + return object; + 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 (typeof object.values[i] !== "object") + throw TypeError(".google.bigtable.v2.ProtoRows.values: object expected"); + message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i]); + } + } + 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) { + if (!options) + options = {}; + 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); + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoRowsBatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.batchData = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.batchData != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.ProtoRowsBatch) + return object; + 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) { + if (!options) + options = {}; + 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 && message.hasOwnProperty("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 {Uint8Array|null} [resumeToken] PartialResultSet resumeToken + * @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) + 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 resumeToken. + * @member {Uint8Array} resumeToken + * @memberof google.bigtable.v2.PartialResultSet + * @instance + */ + PartialResultSet.prototype.resumeToken = $util.newBuffer([]); + + /** + * 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) + }); + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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()).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); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PartialResultSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.decode(reader, reader.uint32()); + break; + } + case 5: { + message.resumeToken = reader.bytes(); + break; + } + case 4: { + message.estimatedBatchSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.protoRowsBatch != null && message.hasOwnProperty("protoRowsBatch")) { + properties.partialRows = 1; + { + var error = $root.google.bigtable.v2.ProtoRowsBatch.verify(message.protoRowsBatch); + if (error) + return "protoRowsBatch." + error; + } + } + if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) + return "resumeToken: buffer expected"; + if (message.estimatedBatchSize != null && message.hasOwnProperty("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) { + if (object instanceof $root.google.bigtable.v2.PartialResultSet) + return object; + var message = new $root.google.bigtable.v2.PartialResultSet(); + if (object.protoRowsBatch != null) { + if (typeof object.protoRowsBatch !== "object") + throw TypeError(".google.bigtable.v2.PartialResultSet.protoRowsBatch: object expected"); + message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.fromObject(object.protoRowsBatch); + } + 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.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) { + if (!options) + options = {}; + 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); + } + } + if (message.protoRowsBatch != null && message.hasOwnProperty("protoRowsBatch")) { + object.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.toObject(message.protoRowsBatch, options); + if (options.oneofs) + object.partialRows = "protoRowsBatch"; + } + if (message.estimatedBatchSize != null && message.hasOwnProperty("estimatedBatchSize")) + object.estimatedBatchSize = message.estimatedBatchSize; + if (message.resumeToken != null && message.hasOwnProperty("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; + 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.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 + */ + + /** + * 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) + 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; + + // 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"|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"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.v2.Type.Bytes.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stringType = $root.google.bigtable.v2.Type.String.decode(reader, reader.uint32()); + break; + } + case 5: { + message.int64Type = $root.google.bigtable.v2.Type.Int64.decode(reader, reader.uint32()); + break; + } + case 12: { + message.float32Type = $root.google.bigtable.v2.Type.Float32.decode(reader, reader.uint32()); + break; + } + case 9: { + message.float64Type = $root.google.bigtable.v2.Type.Float64.decode(reader, reader.uint32()); + break; + } + case 8: { + message.boolType = $root.google.bigtable.v2.Type.Bool.decode(reader, reader.uint32()); + break; + } + case 10: { + message.timestampType = $root.google.bigtable.v2.Type.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.dateType = $root.google.bigtable.v2.Type.Date.decode(reader, reader.uint32()); + break; + } + case 6: { + message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.decode(reader, reader.uint32()); + break; + } + case 7: { + message.structType = $root.google.bigtable.v2.Type.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.arrayType = $root.google.bigtable.v2.Type.Array.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mapType = $root.google.bigtable.v2.Type.Map.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType); + if (error) + return "bytesType." + error; + } + } + if (message.stringType != null && message.hasOwnProperty("stringType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.String.verify(message.stringType); + if (error) + return "stringType." + error; + } + } + if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Int64.verify(message.int64Type); + if (error) + return "int64Type." + error; + } + } + if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Float32.verify(message.float32Type); + if (error) + return "float32Type." + error; + } + } + if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Float64.verify(message.float64Type); + if (error) + return "float64Type." + error; + } + } + if (message.boolType != null && message.hasOwnProperty("boolType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Bool.verify(message.boolType); + if (error) + return "boolType." + error; + } + } + if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Timestamp.verify(message.timestampType); + if (error) + return "timestampType." + error; + } + } + if (message.dateType != null && message.hasOwnProperty("dateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Date.verify(message.dateType); + if (error) + return "dateType." + error; + } + } + if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.verify(message.aggregateType); + if (error) + return "aggregateType." + error; + } + } + if (message.structType != null && message.hasOwnProperty("structType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Struct.verify(message.structType); + if (error) + return "structType." + error; + } + } + if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Array.verify(message.arrayType); + if (error) + return "arrayType." + error; + } + } + if (message.mapType != null && message.hasOwnProperty("mapType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Map.verify(message.mapType); + if (error) + return "mapType." + 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) { + if (object instanceof $root.google.bigtable.v2.Type) + return object; + var message = new $root.google.bigtable.v2.Type(); + if (object.bytesType != null) { + if (typeof object.bytesType !== "object") + throw TypeError(".google.bigtable.v2.Type.bytesType: object expected"); + message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType); + } + if (object.stringType != null) { + if (typeof object.stringType !== "object") + throw TypeError(".google.bigtable.v2.Type.stringType: object expected"); + message.stringType = $root.google.bigtable.v2.Type.String.fromObject(object.stringType); + } + if (object.int64Type != null) { + if (typeof object.int64Type !== "object") + throw TypeError(".google.bigtable.v2.Type.int64Type: object expected"); + message.int64Type = $root.google.bigtable.v2.Type.Int64.fromObject(object.int64Type); + } + if (object.float32Type != null) { + if (typeof object.float32Type !== "object") + throw TypeError(".google.bigtable.v2.Type.float32Type: object expected"); + message.float32Type = $root.google.bigtable.v2.Type.Float32.fromObject(object.float32Type); + } + if (object.float64Type != null) { + if (typeof object.float64Type !== "object") + throw TypeError(".google.bigtable.v2.Type.float64Type: object expected"); + message.float64Type = $root.google.bigtable.v2.Type.Float64.fromObject(object.float64Type); + } + if (object.boolType != null) { + if (typeof object.boolType !== "object") + throw TypeError(".google.bigtable.v2.Type.boolType: object expected"); + message.boolType = $root.google.bigtable.v2.Type.Bool.fromObject(object.boolType); + } + if (object.timestampType != null) { + if (typeof object.timestampType !== "object") + throw TypeError(".google.bigtable.v2.Type.timestampType: object expected"); + message.timestampType = $root.google.bigtable.v2.Type.Timestamp.fromObject(object.timestampType); + } + if (object.dateType != null) { + if (typeof object.dateType !== "object") + throw TypeError(".google.bigtable.v2.Type.dateType: object expected"); + message.dateType = $root.google.bigtable.v2.Type.Date.fromObject(object.dateType); + } + if (object.aggregateType != null) { + if (typeof object.aggregateType !== "object") + throw TypeError(".google.bigtable.v2.Type.aggregateType: object expected"); + message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.fromObject(object.aggregateType); + } + if (object.structType != null) { + if (typeof object.structType !== "object") + throw TypeError(".google.bigtable.v2.Type.structType: object expected"); + message.structType = $root.google.bigtable.v2.Type.Struct.fromObject(object.structType); + } + if (object.arrayType != null) { + if (typeof object.arrayType !== "object") + throw TypeError(".google.bigtable.v2.Type.arrayType: object expected"); + message.arrayType = $root.google.bigtable.v2.Type.Array.fromObject(object.arrayType); + } + if (object.mapType != null) { + if (typeof object.mapType !== "object") + throw TypeError(".google.bigtable.v2.Type.mapType: object expected"); + message.mapType = $root.google.bigtable.v2.Type.Map.fromObject(object.mapType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options); + if (options.oneofs) + object.kind = "bytesType"; + } + if (message.stringType != null && message.hasOwnProperty("stringType")) { + object.stringType = $root.google.bigtable.v2.Type.String.toObject(message.stringType, options); + if (options.oneofs) + object.kind = "stringType"; + } + if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + object.arrayType = $root.google.bigtable.v2.Type.Array.toObject(message.arrayType, options); + if (options.oneofs) + object.kind = "arrayType"; + } + if (message.mapType != null && message.hasOwnProperty("mapType")) { + object.mapType = $root.google.bigtable.v2.Type.Map.toObject(message.mapType, options); + if (options.oneofs) + object.kind = "mapType"; + } + if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + object.int64Type = $root.google.bigtable.v2.Type.Int64.toObject(message.int64Type, options); + if (options.oneofs) + object.kind = "int64Type"; + } + if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + object.aggregateType = $root.google.bigtable.v2.Type.Aggregate.toObject(message.aggregateType, options); + if (options.oneofs) + object.kind = "aggregateType"; + } + if (message.structType != null && message.hasOwnProperty("structType")) { + object.structType = $root.google.bigtable.v2.Type.Struct.toObject(message.structType, options); + if (options.oneofs) + object.kind = "structType"; + } + if (message.boolType != null && message.hasOwnProperty("boolType")) { + object.boolType = $root.google.bigtable.v2.Type.Bool.toObject(message.boolType, options); + if (options.oneofs) + object.kind = "boolType"; + } + if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + object.float64Type = $root.google.bigtable.v2.Type.Float64.toObject(message.float64Type, options); + if (options.oneofs) + object.kind = "float64Type"; + } + if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + object.timestampType = $root.google.bigtable.v2.Type.Timestamp.toObject(message.timestampType, options); + if (options.oneofs) + object.kind = "timestampType"; + } + if (message.dateType != null && message.hasOwnProperty("dateType")) { + object.dateType = $root.google.bigtable.v2.Type.Date.toObject(message.dateType, options); + if (options.oneofs) + object.kind = "dateType"; + } + if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + object.float32Type = $root.google.bigtable.v2.Type.Float32.toObject(message.float32Type, options); + if (options.oneofs) + object.kind = "float32Type"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.v2.Type.Bytes.Encoding.verify(message.encoding); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes) + return object; + var message = new $root.google.bigtable.v2.Type.Bytes(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.v2.Type.Bytes.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.fromObject(object.encoding); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.toObject(message.encoding, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.raw != null && message.hasOwnProperty("raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.verify(message.raw); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding) + return object; + var message = new $root.google.bigtable.v2.Type.Bytes.Encoding(); + if (object.raw != null) { + if (typeof object.raw !== "object") + throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding.raw: object expected"); + message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.fromObject(object.raw); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.raw != null && message.hasOwnProperty("raw")) { + object.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options); + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object 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) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding.Raw) + return object; + return new $root.google.bigtable.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.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() { + return {}; + }; + + /** + * 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.String.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.v2.Type.String.Encoding.verify(message.encoding); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.String) + return object; + var message = new $root.google.bigtable.v2.Type.String(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.v2.Type.String.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.String.Encoding.fromObject(object.encoding); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.v2.Type.String.Encoding.toObject(message.encoding, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.decode(reader, reader.uint32()); + break; + } + case 2: { + message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw); + if (error) + return "utf8Raw." + error; + } + } + if (message.utf8Bytes != null && message.hasOwnProperty("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); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.String.Encoding) + return object; + var message = new $root.google.bigtable.v2.Type.String.Encoding(); + if (object.utf8Raw != null) { + if (typeof object.utf8Raw !== "object") + throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Raw: object expected"); + message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.fromObject(object.utf8Raw); + } + if (object.utf8Bytes != null) { + if (typeof object.utf8Bytes !== "object") + throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Bytes: object expected"); + message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.fromObject(object.utf8Bytes); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { + object.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options); + if (options.oneofs) + object.encoding = "utf8Raw"; + } + if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { + object.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options); + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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) { + if (!writer) + writer = $Writer.create(); + 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object 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) { + if (object instanceof $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) + return object; + return new $root.google.bigtable.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.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() { + return {}; + }; + + /** + * 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; + })(); - RowFilter.Chain = (function() { + return Encoding; + })(); + + return String; + })(); + + Type.Int64 = (function() { /** - * Properties of a Chain. - * @memberof google.bigtable.v2.RowFilter - * @interface IChain - * @property {Array.|null} [filters] Chain filters + * 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 Chain. - * @memberof google.bigtable.v2.RowFilter - * @classdesc Represents a Chain. - * @implements IChain + * Constructs a new Int64. + * @memberof google.bigtable.v2.Type + * @classdesc Represents an Int64. + * @implements IInt64 * @constructor - * @param {google.bigtable.v2.RowFilter.IChain=} [properties] Properties to set + * @param {google.bigtable.v2.Type.IInt64=} [properties] Properties to set */ - function Chain(properties) { - this.filters = []; + function Int64(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43873,78 +55254,75 @@ } /** - * Chain filters. - * @member {Array.} filters - * @memberof google.bigtable.v2.RowFilter.Chain + * Int64 encoding. + * @member {google.bigtable.v2.Type.Int64.IEncoding|null|undefined} encoding + * @memberof google.bigtable.v2.Type.Int64 * @instance */ - Chain.prototype.filters = $util.emptyArray; + Int64.prototype.encoding = null; /** - * Creates a new Chain instance using the specified properties. + * Creates a new Int64 instance using the specified properties. * @function create - * @memberof google.bigtable.v2.RowFilter.Chain + * @memberof google.bigtable.v2.Type.Int64 * @static - * @param {google.bigtable.v2.RowFilter.IChain=} [properties] Properties to set - * @returns {google.bigtable.v2.RowFilter.Chain} Chain instance + * @param {google.bigtable.v2.Type.IInt64=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Int64} Int64 instance */ - Chain.create = function create(properties) { - return new Chain(properties); + Int64.create = function create(properties) { + return new Int64(properties); }; /** - * Encodes the specified Chain message. Does not implicitly {@link google.bigtable.v2.RowFilter.Chain.verify|verify} messages. + * Encodes the specified Int64 message. Does not implicitly {@link google.bigtable.v2.Type.Int64.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.RowFilter.Chain + * @memberof google.bigtable.v2.Type.Int64 * @static - * @param {google.bigtable.v2.RowFilter.IChain} message Chain message or plain object to encode + * @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 */ - Chain.encode = function encode(message, writer) { + Int64.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).ldelim(); + 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()).ldelim(); return writer; }; /** - * Encodes the specified Chain message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Chain.verify|verify} messages. + * 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.RowFilter.Chain + * @memberof google.bigtable.v2.Type.Int64 * @static - * @param {google.bigtable.v2.RowFilter.IChain} message Chain message or plain object to encode + * @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 */ - Chain.encodeDelimited = function encodeDelimited(message, writer) { + Int64.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Chain message from the specified reader or buffer. + * Decodes an Int64 message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.RowFilter.Chain + * @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.RowFilter.Chain} Chain + * @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 */ - Chain.decode = function decode(reader, length) { + Int64.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter.Chain(); + 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(); 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())); + message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.decode(reader, reader.uint32()); break; } default: @@ -43956,140 +55334,561 @@ }; /** - * Decodes a Chain message from the specified reader or buffer, length delimited. + * Decodes an Int64 message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.RowFilter.Chain + * @memberof google.bigtable.v2.Type.Int64 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.RowFilter.Chain} Chain + * @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 */ - Chain.decodeDelimited = function decodeDelimited(reader) { + Int64.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Chain message. + * Verifies an Int64 message. * @function verify - * @memberof google.bigtable.v2.RowFilter.Chain + * @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 */ - Chain.verify = function verify(message) { + Int64.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.filters != null && message.hasOwnProperty("filters")) { - if (!Array.isArray(message.filters)) - return "filters: array expected"; - for (var i = 0; i < message.filters.length; ++i) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i]); - if (error) - return "filters." + error; - } + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.v2.Type.Int64.Encoding.verify(message.encoding); + if (error) + return "encoding." + error; } return null; }; /** - * Creates a Chain message from a plain object. Also converts values to their respective internal types. + * Creates an Int64 message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.RowFilter.Chain + * @memberof google.bigtable.v2.Type.Int64 * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.RowFilter.Chain} Chain + * @returns {google.bigtable.v2.Type.Int64} Int64 */ - Chain.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.RowFilter.Chain) + Int64.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Int64) return object; - 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 (typeof object.filters[i] !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Chain.filters: object expected"); - message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i]); - } + var message = new $root.google.bigtable.v2.Type.Int64(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.v2.Type.Int64.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.fromObject(object.encoding); } return message; }; /** - * Creates a plain object from a Chain message. Also converts values to other types if specified. + * Creates a plain object from an Int64 message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.RowFilter.Chain + * @memberof google.bigtable.v2.Type.Int64 * @static - * @param {google.bigtable.v2.RowFilter.Chain} message Chain + * @param {google.bigtable.v2.Type.Int64} message Int64 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Chain.toObject = function toObject(message, options) { + Int64.toObject = function toObject(message, options) { if (!options) options = {}; 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); - } + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.encoding, options); return object; }; /** - * Converts this Chain to JSON. + * Converts this Int64 to JSON. * @function toJSON - * @memberof google.bigtable.v2.RowFilter.Chain + * @memberof google.bigtable.v2.Type.Int64 * @instance * @returns {Object.} JSON object */ - Chain.prototype.toJSON = function toJSON() { + Int64.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Chain + * Gets the default type url for Int64 * @function getTypeUrl - * @memberof google.bigtable.v2.RowFilter.Chain + * @memberof google.bigtable.v2.Type.Int64 * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Chain.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Int64.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.RowFilter.Chain"; + return typeUrlPrefix + "/google.bigtable.v2.Type.Int64"; }; - return Chain; + 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 + */ + + /** + * 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) + 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; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"bigEndianBytes"|undefined} encoding + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["bigEndianBytes"]), + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes); + if (error) + return "bigEndianBytes." + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding) + return object; + var message = new $root.google.bigtable.v2.Type.Int64.Encoding(); + if (object.bigEndianBytes != null) { + if (typeof object.bigEndianBytes !== "object") + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.bigEndianBytes: object expected"); + message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.fromObject(object.bigEndianBytes); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + object.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options); + if (options.oneofs) + object.encoding = "bigEndianBytes"; + } + 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) + 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) { + if (!writer) + writer = $Writer.create(); + 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()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.v2.Type.Bytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) + return object; + var message = new $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes(); + if (object.bytesType != null) { + if (typeof object.bytesType !== "object") + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytesType: object expected"); + message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bytesType = null; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) + object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options); + 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; + })(); + + return Encoding; + })(); + + return Int64; })(); - RowFilter.Interleave = (function() { + Type.Bool = (function() { /** - * Properties of an Interleave. - * @memberof google.bigtable.v2.RowFilter - * @interface IInterleave - * @property {Array.|null} [filters] Interleave filters + * Properties of a Bool. + * @memberof google.bigtable.v2.Type + * @interface IBool */ /** - * Constructs a new Interleave. - * @memberof google.bigtable.v2.RowFilter - * @classdesc Represents an Interleave. - * @implements IInterleave + * Constructs a new Bool. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Bool. + * @implements IBool * @constructor - * @param {google.bigtable.v2.RowFilter.IInterleave=} [properties] Properties to set + * @param {google.bigtable.v2.Type.IBool=} [properties] Properties to set */ - function Interleave(properties) { - this.filters = []; + function Bool(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44097,80 +55896,63 @@ } /** - * 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. + * Creates a new Bool instance using the specified properties. * @function create - * @memberof google.bigtable.v2.RowFilter.Interleave + * @memberof google.bigtable.v2.Type.Bool * @static - * @param {google.bigtable.v2.RowFilter.IInterleave=} [properties] Properties to set - * @returns {google.bigtable.v2.RowFilter.Interleave} Interleave instance + * @param {google.bigtable.v2.Type.IBool=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Bool} Bool instance */ - Interleave.create = function create(properties) { - return new Interleave(properties); + Bool.create = function create(properties) { + return new Bool(properties); }; /** - * Encodes the specified Interleave message. Does not implicitly {@link google.bigtable.v2.RowFilter.Interleave.verify|verify} messages. + * Encodes the specified Bool message. Does not implicitly {@link google.bigtable.v2.Type.Bool.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.RowFilter.Interleave + * @memberof google.bigtable.v2.Type.Bool * @static - * @param {google.bigtable.v2.RowFilter.IInterleave} message Interleave message or plain object to encode + * @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 */ - Interleave.encode = function encode(message, writer) { + Bool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).ldelim(); return writer; }; /** - * Encodes the specified Interleave message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Interleave.verify|verify} messages. + * 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.RowFilter.Interleave + * @memberof google.bigtable.v2.Type.Bool * @static - * @param {google.bigtable.v2.RowFilter.IInterleave} message Interleave message or plain object to encode + * @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 */ - Interleave.encodeDelimited = function encodeDelimited(message, writer) { + Bool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Interleave message from the specified reader or buffer. + * Decodes a Bool message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.RowFilter.Interleave + * @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.RowFilter.Interleave} Interleave + * @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 */ - Interleave.decode = function decode(reader, length) { + Bool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter.Interleave(); + 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(); 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())); - break; - } default: reader.skipType(tag & 7); break; @@ -44180,141 +55962,108 @@ }; /** - * Decodes an Interleave message from the specified reader or buffer, length delimited. + * Decodes a Bool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.RowFilter.Interleave + * @memberof google.bigtable.v2.Type.Bool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.RowFilter.Interleave} Interleave + * @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 */ - Interleave.decodeDelimited = function decodeDelimited(reader) { + Bool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Interleave message. + * Verifies a Bool message. * @function verify - * @memberof google.bigtable.v2.RowFilter.Interleave + * @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 */ - Interleave.verify = function verify(message) { + Bool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.filters != null && message.hasOwnProperty("filters")) { - if (!Array.isArray(message.filters)) - return "filters: array expected"; - for (var i = 0; i < message.filters.length; ++i) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i]); - if (error) - return "filters." + error; - } - } return null; }; /** - * Creates an Interleave message from a plain object. Also converts values to their respective internal types. + * Creates a Bool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.RowFilter.Interleave + * @memberof google.bigtable.v2.Type.Bool * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.RowFilter.Interleave} Interleave + * @returns {google.bigtable.v2.Type.Bool} Bool */ - Interleave.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.RowFilter.Interleave) + Bool.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Bool) return object; - 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 (typeof object.filters[i] !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Interleave.filters: object expected"); - message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i]); - } - } - return message; + return new $root.google.bigtable.v2.Type.Bool(); }; /** - * Creates a plain object from an Interleave message. Also converts values to other types if specified. + * Creates a plain object from a Bool message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.RowFilter.Interleave + * @memberof google.bigtable.v2.Type.Bool * @static - * @param {google.bigtable.v2.RowFilter.Interleave} message Interleave + * @param {google.bigtable.v2.Type.Bool} message Bool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Interleave.toObject = function toObject(message, options) { - if (!options) - options = {}; - 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); - } - return object; + Bool.toObject = function toObject() { + return {}; }; /** - * Converts this Interleave to JSON. + * Converts this Bool to JSON. * @function toJSON - * @memberof google.bigtable.v2.RowFilter.Interleave + * @memberof google.bigtable.v2.Type.Bool * @instance * @returns {Object.} JSON object */ - Interleave.prototype.toJSON = function toJSON() { + Bool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Interleave + * Gets the default type url for Bool * @function getTypeUrl - * @memberof google.bigtable.v2.RowFilter.Interleave + * @memberof google.bigtable.v2.Type.Bool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Interleave.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Bool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.RowFilter.Interleave"; + return typeUrlPrefix + "/google.bigtable.v2.Type.Bool"; }; - return Interleave; + return Bool; })(); - 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 + Type.Float32 = (function() { + + /** + * Properties of a Float32. + * @memberof google.bigtable.v2.Type + * @interface IFloat32 */ /** - * Constructs a new Condition. - * @memberof google.bigtable.v2.RowFilter - * @classdesc Represents a Condition. - * @implements ICondition + * Constructs a new Float32. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Float32. + * @implements IFloat32 * @constructor - * @param {google.bigtable.v2.RowFilter.ICondition=} [properties] Properties to set + * @param {google.bigtable.v2.Type.IFloat32=} [properties] Properties to set */ - function Condition(properties) { + function Float32(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44322,105 +56071,63 @@ } /** - * 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. + * Creates a new Float32 instance using the specified properties. * @function create - * @memberof google.bigtable.v2.RowFilter.Condition + * @memberof google.bigtable.v2.Type.Float32 * @static - * @param {google.bigtable.v2.RowFilter.ICondition=} [properties] Properties to set - * @returns {google.bigtable.v2.RowFilter.Condition} Condition instance + * @param {google.bigtable.v2.Type.IFloat32=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Float32} Float32 instance */ - Condition.create = function create(properties) { - return new Condition(properties); + Float32.create = function create(properties) { + return new Float32(properties); }; /** - * Encodes the specified Condition message. Does not implicitly {@link google.bigtable.v2.RowFilter.Condition.verify|verify} messages. + * Encodes the specified Float32 message. Does not implicitly {@link google.bigtable.v2.Type.Float32.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.RowFilter.Condition + * @memberof google.bigtable.v2.Type.Float32 * @static - * @param {google.bigtable.v2.RowFilter.ICondition} message Condition message or plain object to encode + * @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 */ - Condition.encode = function encode(message, writer) { + Float32.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).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()).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()).ldelim(); return writer; }; /** - * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Condition.verify|verify} messages. + * 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.RowFilter.Condition + * @memberof google.bigtable.v2.Type.Float32 * @static - * @param {google.bigtable.v2.RowFilter.ICondition} message Condition message or plain object to encode + * @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 */ - Condition.encodeDelimited = function encodeDelimited(message, writer) { + Float32.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Condition message from the specified reader or buffer. + * Decodes a Float32 message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.RowFilter.Condition + * @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.RowFilter.Condition} Condition + * @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 */ - Condition.decode = function decode(reader, length) { + Float32.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter.Condition(); + 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(); switch (tag >>> 3) { - case 1: { - message.predicateFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - break; - } - case 2: { - message.trueFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - break; - } - case 3: { - message.falseFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -44430,644 +56137,347 @@ }; /** - * Decodes a Condition message from the specified reader or buffer, length delimited. + * Decodes a Float32 message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.RowFilter.Condition + * @memberof google.bigtable.v2.Type.Float32 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.RowFilter.Condition} Condition + * @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 */ - Condition.decodeDelimited = function decodeDelimited(reader) { + Float32.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Condition message. + * Verifies a Float32 message. * @function verify - * @memberof google.bigtable.v2.RowFilter.Condition + * @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 */ - Condition.verify = function verify(message) { + Float32.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter); - if (error) - return "predicateFilter." + error; - } - if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.trueFilter); - if (error) - return "trueFilter." + error; - } - if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) { - var error = $root.google.bigtable.v2.RowFilter.verify(message.falseFilter); - if (error) - return "falseFilter." + error; - } return null; }; /** - * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * Creates a Float32 message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.RowFilter.Condition + * @memberof google.bigtable.v2.Type.Float32 * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.RowFilter.Condition} Condition + * @returns {google.bigtable.v2.Type.Float32} Float32 */ - Condition.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.RowFilter.Condition) + Float32.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Float32) return object; - var message = new $root.google.bigtable.v2.RowFilter.Condition(); - if (object.predicateFilter != null) { - if (typeof object.predicateFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Condition.predicateFilter: object expected"); - message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter); - } - if (object.trueFilter != null) { - if (typeof object.trueFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Condition.trueFilter: object expected"); - message.trueFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.trueFilter); - } - if (object.falseFilter != null) { - if (typeof object.falseFilter !== "object") - throw TypeError(".google.bigtable.v2.RowFilter.Condition.falseFilter: object expected"); - message.falseFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.falseFilter); - } - return message; + return new $root.google.bigtable.v2.Type.Float32(); }; /** - * Creates a plain object from a Condition message. Also converts values to other types if specified. + * Creates a plain object from a Float32 message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.RowFilter.Condition + * @memberof google.bigtable.v2.Type.Float32 * @static - * @param {google.bigtable.v2.RowFilter.Condition} message Condition + * @param {google.bigtable.v2.Type.Float32} message Float32 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Condition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.predicateFilter = null; - object.trueFilter = null; - object.falseFilter = null; - } - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) - object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); - if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) - object.trueFilter = $root.google.bigtable.v2.RowFilter.toObject(message.trueFilter, options); - if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) - object.falseFilter = $root.google.bigtable.v2.RowFilter.toObject(message.falseFilter, options); - return object; + Float32.toObject = function toObject() { + return {}; }; /** - * Converts this Condition to JSON. + * Converts this Float32 to JSON. * @function toJSON - * @memberof google.bigtable.v2.RowFilter.Condition + * @memberof google.bigtable.v2.Type.Float32 * @instance * @returns {Object.} JSON object */ - Condition.prototype.toJSON = function toJSON() { + Float32.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Condition + * Gets the default type url for Float32 * @function getTypeUrl - * @memberof google.bigtable.v2.RowFilter.Condition + * @memberof google.bigtable.v2.Type.Float32 * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Condition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Float32.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.RowFilter.Condition"; + return typeUrlPrefix + "/google.bigtable.v2.Type.Float32"; }; - return Condition; + return Float32; })(); - 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.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) - 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 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"|"deleteFromColumn"|"deleteFromFamily"|"deleteFromRow"|undefined} mutation - * @memberof google.bigtable.v2.Mutation - * @instance - */ - Object.defineProperty(Mutation.prototype, "mutation", { - get: $util.oneOfGetter($oneOfFields = ["setCell", "addToCell", "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) { - if (!writer) - writer = $Writer.create(); - 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()).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()).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()).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()).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()).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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.setCell = $root.google.bigtable.v2.Mutation.SetCell.decode(reader, reader.uint32()); - break; - } - case 5: { - message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.decode(reader, reader.uint32()); - break; - } - case 2: { - message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.decode(reader, reader.uint32()); - break; - } - case 3: { - message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.decode(reader, reader.uint32()); - break; - } - case 4: { - message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Type.Float64 = (function() { - /** - * 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()); - }; + /** + * Properties of a Float64. + * @memberof google.bigtable.v2.Type + * @interface IFloat64 + */ - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.setCell != null && message.hasOwnProperty("setCell")) { - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.SetCell.verify(message.setCell); - if (error) - return "setCell." + error; - } - } - if (message.addToCell != null && message.hasOwnProperty("addToCell")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.AddToCell.verify(message.addToCell); - if (error) - return "addToCell." + error; - } - } - if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.DeleteFromColumn.verify(message.deleteFromColumn); - if (error) - return "deleteFromColumn." + error; - } - } - if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.DeleteFromFamily.verify(message.deleteFromFamily); - if (error) - return "deleteFromFamily." + error; - } - } - if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { - if (properties.mutation === 1) - return "mutation: multiple values"; - properties.mutation = 1; - { - var error = $root.google.bigtable.v2.Mutation.DeleteFromRow.verify(message.deleteFromRow); - if (error) - return "deleteFromRow." + error; - } + /** + * 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) + this[keys[i]] = properties[keys[i]]; } - 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) { - if (object instanceof $root.google.bigtable.v2.Mutation) - return object; - var message = new $root.google.bigtable.v2.Mutation(); - if (object.setCell != null) { - if (typeof object.setCell !== "object") - throw TypeError(".google.bigtable.v2.Mutation.setCell: object expected"); - message.setCell = $root.google.bigtable.v2.Mutation.SetCell.fromObject(object.setCell); - } - if (object.addToCell != null) { - if (typeof object.addToCell !== "object") - throw TypeError(".google.bigtable.v2.Mutation.addToCell: object expected"); - message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.fromObject(object.addToCell); - } - if (object.deleteFromColumn != null) { - if (typeof object.deleteFromColumn !== "object") - throw TypeError(".google.bigtable.v2.Mutation.deleteFromColumn: object expected"); - message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.fromObject(object.deleteFromColumn); - } - if (object.deleteFromFamily != null) { - if (typeof object.deleteFromFamily !== "object") - throw TypeError(".google.bigtable.v2.Mutation.deleteFromFamily: object expected"); - message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.fromObject(object.deleteFromFamily); - } - if (object.deleteFromRow != null) { - if (typeof object.deleteFromRow !== "object") - throw TypeError(".google.bigtable.v2.Mutation.deleteFromRow: object expected"); - message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.fromObject(object.deleteFromRow); - } - return message; - }; + /** + * 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); + }; - /** - * 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) { - if (!options) - options = {}; - var object = {}; - if (message.setCell != null && message.hasOwnProperty("setCell")) { - object.setCell = $root.google.bigtable.v2.Mutation.SetCell.toObject(message.setCell, options); - if (options.oneofs) - object.mutation = "setCell"; - } - if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { - object.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.toObject(message.deleteFromColumn, options); - if (options.oneofs) - object.mutation = "deleteFromColumn"; - } - if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { - object.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.toObject(message.deleteFromFamily, options); - if (options.oneofs) - object.mutation = "deleteFromFamily"; - } - if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { - object.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.toObject(message.deleteFromRow, options); - if (options.oneofs) - object.mutation = "deleteFromRow"; - } - if (message.addToCell != null && message.hasOwnProperty("addToCell")) { - object.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.toObject(message.addToCell, options); - if (options.oneofs) - object.mutation = "addToCell"; - } - return object; - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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); - }; + /** + * 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).ldelim(); + }; - /** - * 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"; - }; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - Mutation.SetCell = (function() { + /** + * 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()); + }; /** - * 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 + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * 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 + * 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 */ - function SetCell(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Float64.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Float64) + return object; + return new $root.google.bigtable.v2.Type.Float64(); + }; /** - * SetCell familyName. - * @member {string} familyName - * @memberof google.bigtable.v2.Mutation.SetCell - * @instance + * 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 */ - SetCell.prototype.familyName = ""; + Float64.toObject = function toObject() { + return {}; + }; /** - * SetCell columnQualifier. - * @member {Uint8Array} columnQualifier - * @memberof google.bigtable.v2.Mutation.SetCell + * Converts this Float64 to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Float64 * @instance + * @returns {Object.} JSON object */ - SetCell.prototype.columnQualifier = $util.newBuffer([]); + Float64.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * SetCell timestampMicros. - * @member {number|Long} timestampMicros - * @memberof google.bigtable.v2.Mutation.SetCell - * @instance + * 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 */ - SetCell.prototype.timestampMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Float64.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Float64"; + }; + + return Float64; + })(); + + Type.Timestamp = (function() { /** - * SetCell value. - * @member {Uint8Array} value - * @memberof google.bigtable.v2.Mutation.SetCell - * @instance + * Properties of a Timestamp. + * @memberof google.bigtable.v2.Type + * @interface ITimestamp */ - SetCell.prototype.value = $util.newBuffer([]); /** - * Creates a new SetCell instance using the specified properties. + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.bigtable.v2.Mutation.SetCell + * @memberof google.bigtable.v2.Type.Timestamp * @static - * @param {google.bigtable.v2.Mutation.ISetCell=} [properties] Properties to set - * @returns {google.bigtable.v2.Mutation.SetCell} SetCell instance + * @param {google.bigtable.v2.Type.ITimestamp=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Timestamp} Timestamp instance */ - SetCell.create = function create(properties) { - return new SetCell(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified SetCell message. Does not implicitly {@link google.bigtable.v2.Mutation.SetCell.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.Mutation.SetCell + * @memberof google.bigtable.v2.Type.Timestamp * @static - * @param {google.bigtable.v2.Mutation.ISetCell} message SetCell message or plain object to encode + * @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 */ - SetCell.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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. + * 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.Mutation.SetCell + * @memberof google.bigtable.v2.Type.Timestamp * @static - * @param {google.bigtable.v2.Mutation.ISetCell} message SetCell message or plain object to encode + * @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 */ - SetCell.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetCell message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.Mutation.SetCell + * @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.Mutation.SetCell} SetCell + * @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 */ - SetCell.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.SetCell(); + 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(); 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); break; @@ -45077,182 +56487,108 @@ }; /** - * Decodes a SetCell message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.Mutation.SetCell + * @memberof google.bigtable.v2.Type.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.Mutation.SetCell} SetCell + * @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 */ - SetCell.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetCell message. + * Verifies a Timestamp message. * @function verify - * @memberof google.bigtable.v2.Mutation.SetCell + * @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 */ - SetCell.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) - return "columnQualifier: buffer expected"; - if (message.timestampMicros != null && message.hasOwnProperty("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 && message.hasOwnProperty("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. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.Mutation.SetCell + * @memberof google.bigtable.v2.Type.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.Mutation.SetCell} SetCell + * @returns {google.bigtable.v2.Type.Timestamp} Timestamp */ - SetCell.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.Mutation.SetCell) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Timestamp) return object; - 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)).unsigned = 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; + return new $root.google.bigtable.v2.Type.Timestamp(); }; /** - * Creates a plain object from a SetCell message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.Mutation.SetCell + * @memberof google.bigtable.v2.Type.Timestamp * @static - * @param {google.bigtable.v2.Mutation.SetCell} message SetCell + * @param {google.bigtable.v2.Type.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetCell.toObject = function toObject(message, options) { - if (!options) - options = {}; - 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() : long; - } else - object.timestampMicros = options.longs === String ? "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 && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("timestampMicros")) - 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 && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; + Timestamp.toObject = function toObject() { + return {}; }; /** - * Converts this SetCell to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.bigtable.v2.Mutation.SetCell + * @memberof google.bigtable.v2.Type.Timestamp * @instance * @returns {Object.} JSON object */ - SetCell.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetCell + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.bigtable.v2.Mutation.SetCell + * @memberof google.bigtable.v2.Type.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetCell.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.Mutation.SetCell"; + return typeUrlPrefix + "/google.bigtable.v2.Type.Timestamp"; }; - return SetCell; + return Timestamp; })(); - Mutation.AddToCell = (function() { + Type.Date = (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 + * Properties of a Date. + * @memberof google.bigtable.v2.Type + * @interface IDate */ /** - * Constructs a new AddToCell. - * @memberof google.bigtable.v2.Mutation - * @classdesc Represents an AddToCell. - * @implements IAddToCell + * Constructs a new Date. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Date. + * @implements IDate * @constructor - * @param {google.bigtable.v2.Mutation.IAddToCell=} [properties] Properties to set + * @param {google.bigtable.v2.Type.IDate=} [properties] Properties to set */ - function AddToCell(properties) { + function Date(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45260,117 +56596,255 @@ } /** - * AddToCell familyName. - * @member {string} familyName - * @memberof google.bigtable.v2.Mutation.AddToCell - * @instance + * 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 */ - AddToCell.prototype.familyName = ""; + Date.create = function create(properties) { + return new Date(properties); + }; /** - * AddToCell columnQualifier. - * @member {google.bigtable.v2.IValue|null|undefined} columnQualifier - * @memberof google.bigtable.v2.Mutation.AddToCell - * @instance + * 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 */ - AddToCell.prototype.columnQualifier = null; + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * AddToCell timestamp. - * @member {google.bigtable.v2.IValue|null|undefined} timestamp - * @memberof google.bigtable.v2.Mutation.AddToCell + * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + 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 */ - AddToCell.prototype.timestamp = null; + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * AddToCell input. - * @member {google.bigtable.v2.IValue|null|undefined} input - * @memberof google.bigtable.v2.Mutation.AddToCell + * 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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Array.} fields + * @memberof google.bigtable.v2.Type.Struct * @instance */ - AddToCell.prototype.input = null; + Struct.prototype.fields = $util.emptyArray; /** - * Creates a new AddToCell instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.bigtable.v2.Mutation.AddToCell + * @memberof google.bigtable.v2.Type.Struct * @static - * @param {google.bigtable.v2.Mutation.IAddToCell=} [properties] Properties to set - * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell instance + * @param {google.bigtable.v2.Type.IStruct=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Struct} Struct instance */ - AddToCell.create = function create(properties) { - return new AddToCell(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified AddToCell message. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.bigtable.v2.Type.Struct.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.Mutation.AddToCell + * @memberof google.bigtable.v2.Type.Struct * @static - * @param {google.bigtable.v2.Mutation.IAddToCell} message AddToCell message or plain object to encode + * @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 */ - AddToCell.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).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()).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()).ldelim(); + 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()).ldelim(); return writer; }; /** - * Encodes the specified AddToCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * 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.Mutation.AddToCell + * @memberof google.bigtable.v2.Type.Struct * @static - * @param {google.bigtable.v2.Mutation.IAddToCell} message AddToCell message or plain object to encode + * @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 */ - AddToCell.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AddToCell message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.Mutation.AddToCell + * @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.Mutation.AddToCell} AddToCell + * @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 */ - AddToCell.decode = function decode(reader, length) { + Struct.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.AddToCell(); + 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(); switch (tag >>> 3) { case 1: { - message.familyName = reader.string(); - break; - } - case 2: { - message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); - break; - } - case 3: { - message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); - break; - } - case 4: { - message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.bigtable.v2.Type.Struct.Field.decode(reader, reader.uint32())); break; } default: @@ -45382,164 +56856,371 @@ }; /** - * Decodes an AddToCell message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.Mutation.AddToCell + * @memberof google.bigtable.v2.Type.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell + * @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 */ - AddToCell.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AddToCell message. + * Verifies a Struct message. * @function verify - * @memberof google.bigtable.v2.Mutation.AddToCell + * @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 */ - AddToCell.verify = function verify(message) { + Struct.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { - var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier); - if (error) - return "columnQualifier." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.bigtable.v2.Value.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.input != null && message.hasOwnProperty("input")) { - var error = $root.google.bigtable.v2.Value.verify(message.input); - if (error) - return "input." + error; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.bigtable.v2.Type.Struct.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } } return null; }; /** - * Creates an AddToCell message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.Mutation.AddToCell + * @memberof google.bigtable.v2.Type.Struct * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell + * @returns {google.bigtable.v2.Type.Struct} Struct */ - AddToCell.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.Mutation.AddToCell) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Struct) return object; - var message = new $root.google.bigtable.v2.Mutation.AddToCell(); - if (object.familyName != null) - message.familyName = String(object.familyName); - if (object.columnQualifier != null) { - if (typeof object.columnQualifier !== "object") - throw TypeError(".google.bigtable.v2.Mutation.AddToCell.columnQualifier: object expected"); - message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.bigtable.v2.Mutation.AddToCell.timestamp: object expected"); - message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp); - } - if (object.input != null) { - if (typeof object.input !== "object") - throw TypeError(".google.bigtable.v2.Mutation.AddToCell.input: object expected"); - message.input = $root.google.bigtable.v2.Value.fromObject(object.input); + 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 (typeof object.fields[i] !== "object") + throw TypeError(".google.bigtable.v2.Type.Struct.fields: object expected"); + message.fields[i] = $root.google.bigtable.v2.Type.Struct.Field.fromObject(object.fields[i]); + } } return message; }; /** - * Creates a plain object from an AddToCell message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.Mutation.AddToCell + * @memberof google.bigtable.v2.Type.Struct * @static - * @param {google.bigtable.v2.Mutation.AddToCell} message AddToCell + * @param {google.bigtable.v2.Type.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AddToCell.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.familyName = ""; - object.columnQualifier = null; - object.timestamp = null; - object.input = null; + if (options.arrays || options.defaults) + object.fields = []; + 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); } - if (message.familyName != null && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); - if (message.input != null && message.hasOwnProperty("input")) - object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); return object; }; /** - * Converts this AddToCell to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.bigtable.v2.Mutation.AddToCell + * @memberof google.bigtable.v2.Type.Struct * @instance * @returns {Object.} JSON object */ - AddToCell.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AddToCell + * Gets the default type url for Struct * @function getTypeUrl - * @memberof google.bigtable.v2.Mutation.AddToCell + * @memberof google.bigtable.v2.Type.Struct * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AddToCell.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.Mutation.AddToCell"; + return typeUrlPrefix + "/google.bigtable.v2.Type.Struct"; }; - return AddToCell; + 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) + 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) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type); + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Struct.Field) + return object; + var message = new $root.google.bigtable.v2.Type.Struct.Field(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.type != null) { + if (typeof object.type !== "object") + throw TypeError(".google.bigtable.v2.Type.Struct.Field.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type); + } + 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) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.type = null; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); + 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; + })(); + + return Struct; })(); - Mutation.DeleteFromColumn = (function() { + Type.Array = (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 + * Properties of an Array. + * @memberof google.bigtable.v2.Type + * @interface IArray + * @property {google.bigtable.v2.IType|null} [elementType] Array elementType */ /** - * Constructs a new DeleteFromColumn. - * @memberof google.bigtable.v2.Mutation - * @classdesc Represents a DeleteFromColumn. - * @implements IDeleteFromColumn + * Constructs a new Array. + * @memberof google.bigtable.v2.Type + * @classdesc Represents an Array. + * @implements IArray * @constructor - * @param {google.bigtable.v2.Mutation.IDeleteFromColumn=} [properties] Properties to set + * @param {google.bigtable.v2.Type.IArray=} [properties] Properties to set */ - function DeleteFromColumn(properties) { + function Array(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45547,103 +57228,75 @@ } /** - * 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 + * Array elementType. + * @member {google.bigtable.v2.IType|null|undefined} elementType + * @memberof google.bigtable.v2.Type.Array * @instance */ - DeleteFromColumn.prototype.timeRange = null; + Array.prototype.elementType = null; /** - * Creates a new DeleteFromColumn instance using the specified properties. + * Creates a new Array instance using the specified properties. * @function create - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @memberof google.bigtable.v2.Type.Array * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromColumn=} [properties] Properties to set - * @returns {google.bigtable.v2.Mutation.DeleteFromColumn} DeleteFromColumn instance + * @param {google.bigtable.v2.Type.IArray=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Array} Array instance */ - DeleteFromColumn.create = function create(properties) { - return new DeleteFromColumn(properties); + Array.create = function create(properties) { + return new Array(properties); }; /** - * Encodes the specified DeleteFromColumn message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromColumn.verify|verify} messages. + * Encodes the specified Array message. Does not implicitly {@link google.bigtable.v2.Type.Array.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @memberof google.bigtable.v2.Type.Array * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromColumn} message DeleteFromColumn message or plain object to encode + * @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 */ - DeleteFromColumn.encode = function encode(message, writer) { + Array.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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()).ldelim(); + 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()).ldelim(); return writer; }; /** - * Encodes the specified DeleteFromColumn message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromColumn.verify|verify} messages. + * 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.Mutation.DeleteFromColumn + * @memberof google.bigtable.v2.Type.Array * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromColumn} message DeleteFromColumn message or plain object to encode + * @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 */ - DeleteFromColumn.encodeDelimited = function encodeDelimited(message, writer) { + Array.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFromColumn message from the specified reader or buffer. + * Decodes an Array message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @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.Mutation.DeleteFromColumn} DeleteFromColumn + * @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 */ - DeleteFromColumn.decode = function decode(reader, length) { + Array.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.DeleteFromColumn(); + 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(); 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()); + message.elementType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); break; } default: @@ -45655,153 +57308,128 @@ }; /** - * Decodes a DeleteFromColumn message from the specified reader or buffer, length delimited. + * Decodes an Array message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @memberof google.bigtable.v2.Type.Array * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.Mutation.DeleteFromColumn} DeleteFromColumn + * @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 */ - DeleteFromColumn.decodeDelimited = function decodeDelimited(reader) { + Array.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFromColumn message. + * Verifies an Array message. * @function verify - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @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 */ - DeleteFromColumn.verify = function verify(message) { + Array.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) - return "columnQualifier: buffer expected"; - if (message.timeRange != null && message.hasOwnProperty("timeRange")) { - var error = $root.google.bigtable.v2.TimestampRange.verify(message.timeRange); + if (message.elementType != null && message.hasOwnProperty("elementType")) { + var error = $root.google.bigtable.v2.Type.verify(message.elementType); if (error) - return "timeRange." + error; + return "elementType." + error; } return null; }; /** - * Creates a DeleteFromColumn message from a plain object. Also converts values to their respective internal types. + * Creates an Array message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @memberof google.bigtable.v2.Type.Array * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.Mutation.DeleteFromColumn} DeleteFromColumn + * @returns {google.bigtable.v2.Type.Array} Array */ - DeleteFromColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromColumn) + Array.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Array) return object; - 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 (typeof object.timeRange !== "object") - throw TypeError(".google.bigtable.v2.Mutation.DeleteFromColumn.timeRange: object expected"); - message.timeRange = $root.google.bigtable.v2.TimestampRange.fromObject(object.timeRange); + var message = new $root.google.bigtable.v2.Type.Array(); + if (object.elementType != null) { + if (typeof object.elementType !== "object") + throw TypeError(".google.bigtable.v2.Type.Array.elementType: object expected"); + message.elementType = $root.google.bigtable.v2.Type.fromObject(object.elementType); } return message; }; /** - * Creates a plain object from a DeleteFromColumn message. Also converts values to other types if specified. + * Creates a plain object from an Array message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @memberof google.bigtable.v2.Type.Array * @static - * @param {google.bigtable.v2.Mutation.DeleteFromColumn} message DeleteFromColumn + * @param {google.bigtable.v2.Type.Array} message Array * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFromColumn.toObject = function toObject(message, options) { + Array.toObject = function toObject(message, options) { if (!options) options = {}; 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 && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("timeRange")) - object.timeRange = $root.google.bigtable.v2.TimestampRange.toObject(message.timeRange, options); + if (options.defaults) + object.elementType = null; + if (message.elementType != null && message.hasOwnProperty("elementType")) + object.elementType = $root.google.bigtable.v2.Type.toObject(message.elementType, options); return object; }; /** - * Converts this DeleteFromColumn to JSON. + * Converts this Array to JSON. * @function toJSON - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @memberof google.bigtable.v2.Type.Array * @instance * @returns {Object.} JSON object */ - DeleteFromColumn.prototype.toJSON = function toJSON() { + Array.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteFromColumn + * Gets the default type url for Array * @function getTypeUrl - * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @memberof google.bigtable.v2.Type.Array * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteFromColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Array.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.Mutation.DeleteFromColumn"; + return typeUrlPrefix + "/google.bigtable.v2.Type.Array"; }; - return DeleteFromColumn; + return Array; })(); - Mutation.DeleteFromFamily = (function() { + Type.Map = (function() { /** - * Properties of a DeleteFromFamily. - * @memberof google.bigtable.v2.Mutation - * @interface IDeleteFromFamily - * @property {string|null} [familyName] DeleteFromFamily familyName + * 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 DeleteFromFamily. - * @memberof google.bigtable.v2.Mutation - * @classdesc Represents a DeleteFromFamily. - * @implements IDeleteFromFamily + * Constructs a new Map. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Map. + * @implements IMap * @constructor - * @param {google.bigtable.v2.Mutation.IDeleteFromFamily=} [properties] Properties to set + * @param {google.bigtable.v2.Type.IMap=} [properties] Properties to set */ - function DeleteFromFamily(properties) { + function Map(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45809,75 +57437,89 @@ } /** - * DeleteFromFamily familyName. - * @member {string} familyName - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * Map keyType. + * @member {google.bigtable.v2.IType|null|undefined} keyType + * @memberof google.bigtable.v2.Type.Map * @instance */ - DeleteFromFamily.prototype.familyName = ""; + Map.prototype.keyType = null; /** - * Creates a new DeleteFromFamily instance using the specified properties. + * 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.Mutation.DeleteFromFamily + * @memberof google.bigtable.v2.Type.Map * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromFamily=} [properties] Properties to set - * @returns {google.bigtable.v2.Mutation.DeleteFromFamily} DeleteFromFamily instance + * @param {google.bigtable.v2.Type.IMap=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Map} Map instance */ - DeleteFromFamily.create = function create(properties) { - return new DeleteFromFamily(properties); + Map.create = function create(properties) { + return new Map(properties); }; /** - * Encodes the specified DeleteFromFamily message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromFamily.verify|verify} messages. + * Encodes the specified Map message. Does not implicitly {@link google.bigtable.v2.Type.Map.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @memberof google.bigtable.v2.Type.Map * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromFamily} message DeleteFromFamily message or plain object to encode + * @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 */ - DeleteFromFamily.encode = function encode(message, writer) { + Map.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + 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()).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()).ldelim(); return writer; }; /** - * Encodes the specified DeleteFromFamily message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromFamily.verify|verify} messages. + * 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.Mutation.DeleteFromFamily + * @memberof google.bigtable.v2.Type.Map * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromFamily} message DeleteFromFamily message or plain object to encode + * @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 */ - DeleteFromFamily.encodeDelimited = function encodeDelimited(message, writer) { + Map.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFromFamily message from the specified reader or buffer. + * Decodes a Map message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @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.Mutation.DeleteFromFamily} DeleteFromFamily + * @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 */ - DeleteFromFamily.decode = function decode(reader, length) { + Map.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.DeleteFromFamily(); + 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(); switch (tag >>> 3) { case 1: { - message.familyName = reader.string(); + message.keyType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.valueType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); break; } default: @@ -45889,121 +57531,146 @@ }; /** - * Decodes a DeleteFromFamily message from the specified reader or buffer, length delimited. + * Decodes a Map message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @memberof google.bigtable.v2.Type.Map * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.Mutation.DeleteFromFamily} DeleteFromFamily + * @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 */ - DeleteFromFamily.decodeDelimited = function decodeDelimited(reader) { + Map.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFromFamily message. + * Verifies a Map message. * @function verify - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @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 */ - DeleteFromFamily.verify = function verify(message) { + Map.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; + if (message.keyType != null && message.hasOwnProperty("keyType")) { + var error = $root.google.bigtable.v2.Type.verify(message.keyType); + if (error) + return "keyType." + error; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) { + var error = $root.google.bigtable.v2.Type.verify(message.valueType); + if (error) + return "valueType." + error; + } return null; }; /** - * Creates a DeleteFromFamily message from a plain object. Also converts values to their respective internal types. + * Creates a Map message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @memberof google.bigtable.v2.Type.Map * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.Mutation.DeleteFromFamily} DeleteFromFamily + * @returns {google.bigtable.v2.Type.Map} Map */ - DeleteFromFamily.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromFamily) + Map.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Map) return object; - var message = new $root.google.bigtable.v2.Mutation.DeleteFromFamily(); - if (object.familyName != null) - message.familyName = String(object.familyName); + var message = new $root.google.bigtable.v2.Type.Map(); + if (object.keyType != null) { + if (typeof object.keyType !== "object") + throw TypeError(".google.bigtable.v2.Type.Map.keyType: object expected"); + message.keyType = $root.google.bigtable.v2.Type.fromObject(object.keyType); + } + if (object.valueType != null) { + if (typeof object.valueType !== "object") + throw TypeError(".google.bigtable.v2.Type.Map.valueType: object expected"); + message.valueType = $root.google.bigtable.v2.Type.fromObject(object.valueType); + } return message; }; /** - * Creates a plain object from a DeleteFromFamily message. Also converts values to other types if specified. + * Creates a plain object from a Map message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @memberof google.bigtable.v2.Type.Map * @static - * @param {google.bigtable.v2.Mutation.DeleteFromFamily} message DeleteFromFamily + * @param {google.bigtable.v2.Type.Map} message Map * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFromFamily.toObject = function toObject(message, options) { + Map.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.familyName = ""; - if (message.familyName != null && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; + if (options.defaults) { + object.keyType = null; + object.valueType = null; + } + if (message.keyType != null && message.hasOwnProperty("keyType")) + object.keyType = $root.google.bigtable.v2.Type.toObject(message.keyType, options); + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = $root.google.bigtable.v2.Type.toObject(message.valueType, options); return object; }; /** - * Converts this DeleteFromFamily to JSON. + * Converts this Map to JSON. * @function toJSON - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @memberof google.bigtable.v2.Type.Map * @instance * @returns {Object.} JSON object */ - DeleteFromFamily.prototype.toJSON = function toJSON() { + Map.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteFromFamily + * Gets the default type url for Map * @function getTypeUrl - * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @memberof google.bigtable.v2.Type.Map * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteFromFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.Mutation.DeleteFromFamily"; + return typeUrlPrefix + "/google.bigtable.v2.Type.Map"; }; - return DeleteFromFamily; + return Map; })(); - Mutation.DeleteFromRow = (function() { + Type.Aggregate = (function() { /** - * Properties of a DeleteFromRow. - * @memberof google.bigtable.v2.Mutation - * @interface IDeleteFromRow + * 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 DeleteFromRow. - * @memberof google.bigtable.v2.Mutation - * @classdesc Represents a DeleteFromRow. - * @implements IDeleteFromRow + * Constructs a new Aggregate. + * @memberof google.bigtable.v2.Type + * @classdesc Represents an Aggregate. + * @implements IAggregate * @constructor - * @param {google.bigtable.v2.Mutation.IDeleteFromRow=} [properties] Properties to set + * @param {google.bigtable.v2.Type.IAggregate=} [properties] Properties to set */ - function DeleteFromRow(properties) { + function Aggregate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46011,63 +57678,161 @@ } /** - * Creates a new DeleteFromRow instance using the specified properties. + * 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.Mutation.DeleteFromRow + * @memberof google.bigtable.v2.Type.Aggregate * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromRow=} [properties] Properties to set - * @returns {google.bigtable.v2.Mutation.DeleteFromRow} DeleteFromRow instance + * @param {google.bigtable.v2.Type.IAggregate=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Aggregate} Aggregate instance */ - DeleteFromRow.create = function create(properties) { - return new DeleteFromRow(properties); + Aggregate.create = function create(properties) { + return new Aggregate(properties); }; /** - * Encodes the specified DeleteFromRow message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromRow.verify|verify} messages. + * Encodes the specified Aggregate message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @memberof google.bigtable.v2.Type.Aggregate * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromRow} message DeleteFromRow message or plain object to encode + * @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 */ - DeleteFromRow.encode = function encode(message, writer) { + Aggregate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + 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()).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()).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()).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()).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()).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()).ldelim(); return writer; }; /** - * Encodes the specified DeleteFromRow message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromRow.verify|verify} messages. + * 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.Mutation.DeleteFromRow + * @memberof google.bigtable.v2.Type.Aggregate * @static - * @param {google.bigtable.v2.Mutation.IDeleteFromRow} message DeleteFromRow message or plain object to encode + * @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 */ - DeleteFromRow.encodeDelimited = function encodeDelimited(message, writer) { + Aggregate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFromRow message from the specified reader or buffer. + * Decodes an Aggregate message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @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.Mutation.DeleteFromRow} DeleteFromRow + * @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 */ - DeleteFromRow.decode = function decode(reader, length) { + Aggregate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.DeleteFromRow(); + 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(); switch (tag >>> 3) { + case 1: { + message.inputType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stateType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32()); + break; + } + case 4: { + message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.decode(reader, reader.uint32()); + break; + } + case 5: { + message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.decode(reader, reader.uint32()); + break; + } + case 6: { + message.max = $root.google.bigtable.v2.Type.Aggregate.Max.decode(reader, reader.uint32()); + break; + } + case 7: { + message.min = $root.google.bigtable.v2.Type.Aggregate.Min.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -46077,1076 +57842,903 @@ }; /** - * Decodes a DeleteFromRow message from the specified reader or buffer, length delimited. + * Decodes an Aggregate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @memberof google.bigtable.v2.Type.Aggregate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.v2.Mutation.DeleteFromRow} DeleteFromRow + * @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 */ - DeleteFromRow.decodeDelimited = function decodeDelimited(reader) { + Aggregate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFromRow message. + * Verifies an Aggregate message. * @function verify - * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @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 */ - DeleteFromRow.verify = function verify(message) { + Aggregate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.inputType != null && message.hasOwnProperty("inputType")) { + var error = $root.google.bigtable.v2.Type.verify(message.inputType); + if (error) + return "inputType." + error; + } + if (message.stateType != null && message.hasOwnProperty("stateType")) { + var error = $root.google.bigtable.v2.Type.verify(message.stateType); + if (error) + return "stateType." + error; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Sum.verify(message.sum); + if (error) + return "sum." + error; + } + } + if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify(message.hllppUniqueCount); + if (error) + return "hllppUniqueCount." + error; + } + } + if (message.max != null && message.hasOwnProperty("max")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Max.verify(message.max); + if (error) + return "max." + error; + } + } + if (message.min != null && message.hasOwnProperty("min")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Min.verify(message.min); + if (error) + return "min." + error; + } + } return null; }; /** - * Creates a DeleteFromRow message from a plain object. Also converts values to their respective internal types. + * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @memberof google.bigtable.v2.Type.Aggregate * @static * @param {Object.} object Plain object - * @returns {google.bigtable.v2.Mutation.DeleteFromRow} DeleteFromRow + * @returns {google.bigtable.v2.Type.Aggregate} Aggregate */ - DeleteFromRow.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromRow) + Aggregate.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate) return object; - return new $root.google.bigtable.v2.Mutation.DeleteFromRow(); + var message = new $root.google.bigtable.v2.Type.Aggregate(); + if (object.inputType != null) { + if (typeof object.inputType !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.inputType: object expected"); + message.inputType = $root.google.bigtable.v2.Type.fromObject(object.inputType); + } + if (object.stateType != null) { + if (typeof object.stateType !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.stateType: object expected"); + message.stateType = $root.google.bigtable.v2.Type.fromObject(object.stateType); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.sum: object expected"); + message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.fromObject(object.sum); + } + if (object.hllppUniqueCount != null) { + if (typeof object.hllppUniqueCount !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.hllppUniqueCount: object expected"); + message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount); + } + if (object.max != null) { + if (typeof object.max !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.max: object expected"); + message.max = $root.google.bigtable.v2.Type.Aggregate.Max.fromObject(object.max); + } + if (object.min != null) { + if (typeof object.min !== "object") + throw TypeError(".google.bigtable.v2.Type.Aggregate.min: object expected"); + message.min = $root.google.bigtable.v2.Type.Aggregate.Min.fromObject(object.min); + } + return message; }; /** - * Creates a plain object from a DeleteFromRow message. Also converts values to other types if specified. + * Creates a plain object from an Aggregate message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @memberof google.bigtable.v2.Type.Aggregate * @static - * @param {google.bigtable.v2.Mutation.DeleteFromRow} message DeleteFromRow + * @param {google.bigtable.v2.Type.Aggregate} message Aggregate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFromRow.toObject = function toObject() { - return {}; + Aggregate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputType = null; + object.stateType = null; + } + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = $root.google.bigtable.v2.Type.toObject(message.inputType, options); + if (message.stateType != null && message.hasOwnProperty("stateType")) + object.stateType = $root.google.bigtable.v2.Type.toObject(message.stateType, options); + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.toObject(message.sum, options); + if (options.oneofs) + object.aggregator = "sum"; + } + if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { + object.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options); + if (options.oneofs) + object.aggregator = "hllppUniqueCount"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = $root.google.bigtable.v2.Type.Aggregate.Max.toObject(message.max, options); + if (options.oneofs) + object.aggregator = "max"; + } + if (message.min != null && message.hasOwnProperty("min")) { + object.min = $root.google.bigtable.v2.Type.Aggregate.Min.toObject(message.min, options); + if (options.oneofs) + object.aggregator = "min"; + } + return object; }; /** - * Converts this DeleteFromRow to JSON. + * Converts this Aggregate to JSON. * @function toJSON - * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @memberof google.bigtable.v2.Type.Aggregate * @instance * @returns {Object.} JSON object */ - DeleteFromRow.prototype.toJSON = function toJSON() { + Aggregate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteFromRow + * Gets the default type url for Aggregate * @function getTypeUrl - * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @memberof google.bigtable.v2.Type.Aggregate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteFromRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Aggregate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.v2.Mutation.DeleteFromRow"; + return typeUrlPrefix + "/google.bigtable.v2.Type.Aggregate"; }; - 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) - 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) { - if (!writer) - writer = $Writer.create(); - 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).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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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); - 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.familyName != null && message.hasOwnProperty("familyName")) - if (!$util.isString(message.familyName)) - return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) - return "columnQualifier: buffer expected"; - if (message.appendValue != null && message.hasOwnProperty("appendValue")) { - properties.rule = 1; - if (!(message.appendValue && typeof message.appendValue.length === "number" || $util.isString(message.appendValue))) - return "appendValue: buffer expected"; - } - if (message.incrementAmount != null && message.hasOwnProperty("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; - }; + Aggregate.Sum = (function() { - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRule) - return object; - 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)).unsigned = 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; - }; + /** + * Properties of a Sum. + * @memberof google.bigtable.v2.Type.Aggregate + * @interface ISum + */ - /** - * 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) { - if (!options) - options = {}; - 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); + /** + * 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) + this[keys[i]] = properties[keys[i]]; } - } - if (message.familyName != null && message.hasOwnProperty("familyName")) - object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("incrementAmount")) { - 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() { + /** + * 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); + }; - /** - * Properties of a StreamPartition. - * @memberof google.bigtable.v2 - * @interface IStreamPartition - * @property {google.bigtable.v2.IRowRange|null} [rowRange] StreamPartition rowRange - */ + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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).ldelim(); + }; - /** - * StreamPartition rowRange. - * @member {google.bigtable.v2.IRowRange|null|undefined} rowRange - * @memberof google.bigtable.v2.StreamPartition - * @instance - */ - StreamPartition.prototype.rowRange = null; + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * 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()); + }; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - return writer; - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * 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).ldelim(); - }; + /** + * 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) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Sum) + return object; + return new $root.google.bigtable.v2.Type.Aggregate.Sum(); + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamPartition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rowRange = $root.google.bigtable.v2.RowRange.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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 {}; + }; - /** - * 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()); - }; + /** + * 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); + }; - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowRange != null && message.hasOwnProperty("rowRange")) { - var error = $root.google.bigtable.v2.RowRange.verify(message.rowRange); - if (error) - return "rowRange." + error; - } - return null; - }; + /** + * 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"; + }; - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.StreamPartition) - return object; - var message = new $root.google.bigtable.v2.StreamPartition(); - if (object.rowRange != null) { - if (typeof object.rowRange !== "object") - throw TypeError(".google.bigtable.v2.StreamPartition.rowRange: object expected"); - message.rowRange = $root.google.bigtable.v2.RowRange.fromObject(object.rowRange); - } - return message; - }; + return Sum; + })(); - /** - * 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.rowRange = null; - if (message.rowRange != null && message.hasOwnProperty("rowRange")) - object.rowRange = $root.google.bigtable.v2.RowRange.toObject(message.rowRange, options); - return object; - }; + Aggregate.Max = (function() { - /** - * 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); - }; + /** + * Properties of a Max. + * @memberof google.bigtable.v2.Type.Aggregate + * @interface IMax + */ - /** - * 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"; - }; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - return StreamPartition; - })(); + /** + * 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); + }; - v2.StreamContinuationTokens = (function() { + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Properties of a StreamContinuationTokens. - * @memberof google.bigtable.v2 - * @interface IStreamContinuationTokens - * @property {Array.|null} [tokens] StreamContinuationTokens tokens - */ + /** + * 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).ldelim(); + }; - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * StreamContinuationTokens tokens. - * @member {Array.} tokens - * @memberof google.bigtable.v2.StreamContinuationTokens - * @instance - */ - StreamContinuationTokens.prototype.tokens = $util.emptyArray; + /** + * 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()); + }; - /** - * 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); - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - return writer; - }; + /** + * 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) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Max) + return object; + return new $root.google.bigtable.v2.Type.Aggregate.Max(); + }; - /** - * 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).ldelim(); - }; + /** + * 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 {}; + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationTokens(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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())); - break; + /** + * 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"; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return typeUrlPrefix + "/google.bigtable.v2.Type.Aggregate.Max"; + }; - /** - * 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()); - }; + return Max; + })(); - /** - * 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tokens != null && message.hasOwnProperty("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]); - if (error) - return "tokens." + error; - } - } - return null; - }; + Aggregate.Min = (function() { - /** - * 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) { - if (object instanceof $root.google.bigtable.v2.StreamContinuationTokens) - return object; - 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 (typeof object.tokens[i] !== "object") - throw TypeError(".google.bigtable.v2.StreamContinuationTokens.tokens: object expected"); - message.tokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.tokens[i]); + /** + * 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) + this[keys[i]] = properties[keys[i]]; } - } - 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) { - if (!options) - options = {}; - 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); - } - return object; - }; + /** + * 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); + }; - /** - * 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); - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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"; - }; + /** + * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Min) + return object; + return new $root.google.bigtable.v2.Type.Aggregate.Min(); + }; - return StreamContinuationTokens; - })(); + /** + * 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 {}; + }; - v2.StreamContinuationToken = (function() { + /** + * 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); + }; - /** - * 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 - */ + /** + * 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"; + }; - /** - * 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) - this[keys[i]] = properties[keys[i]]; - } + return Min; + })(); - /** - * StreamContinuationToken partition. - * @member {google.bigtable.v2.IStreamPartition|null|undefined} partition - * @memberof google.bigtable.v2.StreamContinuationToken - * @instance - */ - StreamContinuationToken.prototype.partition = null; + Aggregate.HyperLogLogPlusPlusUniqueCount = (function() { - /** - * StreamContinuationToken token. - * @member {string} token - * @memberof google.bigtable.v2.StreamContinuationToken - * @instance - */ - StreamContinuationToken.prototype.token = ""; + /** + * Properties of a HyperLogLogPlusPlusUniqueCount. + * @memberof google.bigtable.v2.Type.Aggregate + * @interface IHyperLogLogPlusPlusUniqueCount + */ - /** - * 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); - }; + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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) { - if (!writer) - writer = $Writer.create(); - 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()).ldelim(); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.token); - return writer; - }; + /** + * 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 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).ldelim(); - }; + /** + * 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) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationToken(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32()); - break; - } - case 2: { - message.token = reader.string(); - break; + /** + * 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).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + 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()); - }; + /** + * 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 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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partition != null && message.hasOwnProperty("partition")) { - var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition); - if (error) - return "partition." + error; - } - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; - return null; - }; + /** + * 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) { + if (typeof message !== "object" || message === null) + return "object 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) { - if (object instanceof $root.google.bigtable.v2.StreamContinuationToken) - return object; - var message = new $root.google.bigtable.v2.StreamContinuationToken(); - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.bigtable.v2.StreamContinuationToken.partition: object expected"); - message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition); - } - if (object.token != null) - message.token = String(object.token); - return message; - }; + /** + * 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) { + 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 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) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.partition = null; - object.token = ""; - } - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); - if (message.token != null && message.hasOwnProperty("token")) - object.token = message.token; - return object; - }; + /** + * 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 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); - }; + /** + * 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 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"; - }; + /** + * 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 StreamContinuationToken; + return HyperLogLogPlusPlusUniqueCount; + })(); + + return Aggregate; + })(); + + return Type; })(); v2.ReadIterationStats = (function() { @@ -48536,23 +60128,13 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - /** - * ResponseParams _zoneId. - * @member {"zoneId"|undefined} _zoneId - * @memberof google.bigtable.v2.ResponseParams - * @instance - */ + // Virtual OneOf for proto3 optional field Object.defineProperty(ResponseParams.prototype, "_zoneId", { get: $util.oneOfGetter($oneOfFields = ["zoneId"]), set: $util.oneOfSetter($oneOfFields) }); - /** - * ResponseParams _clusterId. - * @member {"clusterId"|undefined} _clusterId - * @memberof google.bigtable.v2.ResponseParams - * @instance - */ + // Virtual OneOf for proto3 optional field Object.defineProperty(ResponseParams.prototype, "_clusterId", { get: $util.oneOfGetter($oneOfFields = ["clusterId"]), set: $util.oneOfSetter($oneOfFields) @@ -73532,6 +85114,256 @@ 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + return type; })(); diff --git a/protos/protos.json b/protos/protos.json index 13a104bf7..b086d3aa0 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -9,7 +12,7 @@ "v2": { "options": { "csharp_namespace": "Google.Cloud.Bigtable.Admin.V2", - "go_package": "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin", + "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", @@ -3373,6 +3376,14 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "backupType": { + "type": "BackupType", + "id": 11 + }, + "hotToStandardTime": { + "type": "google.protobuf.Timestamp", + "id": 12 } }, "nested": { @@ -3382,6 +3393,13 @@ "CREATING": 1, "READY": 2 } + }, + "BackupType": { + "values": { + "BACKUP_TYPE_UNSPECIFIED": 0, + "STANDARD": 1, + "HOT": 2 + } } } }, @@ -3437,7 +3455,15 @@ "bytesType", "stringType", "int64Type", - "aggregateType" + "float32Type", + "float64Type", + "boolType", + "timestampType", + "dateType", + "aggregateType", + "structType", + "arrayType", + "mapType" ] } }, @@ -3454,9 +3480,41 @@ "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 } }, "nested": { @@ -3502,18 +3560,32 @@ "oneofs": { "encoding": { "oneof": [ - "utf8Raw" + "utf8Raw", + "utf8Bytes" ] } }, "fields": { "utf8Raw": { "type": "Utf8Raw", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } + }, + "utf8Bytes": { + "type": "Utf8Bytes", + "id": 2 } }, "nested": { "Utf8Raw": { + "options": { + "deprecated": true + }, + "fields": {} + }, + "Utf8Bytes": { "fields": {} } } @@ -3555,11 +3627,72 @@ } } }, + "Bool": { + "fields": {} + }, + "Float32": { + "fields": {} + }, + "Float64": { + "fields": {} + }, + "Timestamp": { + "fields": {} + }, + "Date": { + "fields": {} + }, + "Struct": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1 + } + }, + "nested": { + "Field": { + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "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" + "sum", + "hllppUniqueCount", + "max", + "min" ] } }, @@ -3578,11 +3711,32 @@ "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": {} } } } @@ -3595,7 +3749,7 @@ "v2": { "options": { "csharp_namespace": "Google.Cloud.Bigtable.V2", - "go_package": "google.golang.org/genproto/googleapis/bigtable/v2;bigtable", + "go_package": "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb", "java_multiple_files": true, "java_outer_classname": "ResponseParamsProto", "java_package": "com.google.bigtable.v2", @@ -3983,6 +4137,45 @@ "(google.api.method_signature)": "table_name,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" + } + ] } } }, @@ -4609,6 +4802,78 @@ } } }, + "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": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protoFormat": { + "type": "ProtoFormat", + "id": 4 + }, + "resumeToken": { + "type": "bytes", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "params": { + "keyType": "string", + "type": "Value", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteQueryResponse": { + "oneofs": { + "response": { + "oneof": [ + "metadata", + "results" + ] + } + }, + "fields": { + "metadata": { + "type": "ResultSetMetadata", + "id": 1 + }, + "results": { + "type": "PartialResultSet", + "id": 2 + } + } + }, "Row": { "fields": { "key": { @@ -4671,11 +4936,22 @@ "oneof": [ "rawValue", "rawTimestampMicros", - "intValue" + "bytesValue", + "stringValue", + "intValue", + "boolValue", + "floatValue", + "timestampValue", + "dateValue", + "arrayValue" ] } }, "fields": { + "type": { + "type": "Type", + "id": 7 + }, "rawValue": { "type": "bytes", "id": 8 @@ -4684,9 +4960,46 @@ "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 } } }, @@ -4969,6 +5282,7 @@ "oneof": [ "setCell", "addToCell", + "mergeToCell", "deleteFromColumn", "deleteFromFamily", "deleteFromRow" @@ -4984,6 +5298,10 @@ "type": "AddToCell", "id": 5 }, + "mergeToCell": { + "type": "MergeToCell", + "id": 6 + }, "deleteFromColumn": { "type": "DeleteFromColumn", "id": 2 @@ -5038,6 +5356,26 @@ } } }, + "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": { @@ -5124,6 +5462,379 @@ } } }, + "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" + ] + } + }, + "fields": { + "protoRowsBatch": { + "type": "ProtoRowsBatch", + "id": 3 + }, + "resumeToken": { + "type": "bytes", + "id": 5 + }, + "estimatedBatchSize": { + "type": "int32", + "id": 4 + } + } + }, + "Type": { + "oneofs": { + "kind": { + "oneof": [ + "bytesType", + "stringType", + "int64Type", + "float32Type", + "float64Type", + "boolType", + "timestampType", + "dateType", + "aggregateType", + "structType", + "arrayType", + "mapType" + ] + } + }, + "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 + } + }, + "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" + ] + } + }, + "fields": { + "bigEndianBytes": { + "type": "BigEndianBytes", + "id": 1 + } + }, + "nested": { + "BigEndianBytes": { + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1 + } + } + } + } + } + } + }, + "Bool": { + "fields": {} + }, + "Float32": { + "fields": {} + }, + "Float64": { + "fields": {} + }, + "Timestamp": { + "fields": {} + }, + "Date": { + "fields": {} + }, + "Struct": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1 + } + }, + "nested": { + "Field": { + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "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": { @@ -7479,11 +8190,12 @@ }, "type": { "options": { - "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "go_package": "google.golang.org/genproto/googleapis/type/date;date", "java_multiple_files": true, - "java_outer_classname": "ExprProto", + "java_outer_classname": "DateProto", "java_package": "com.google.type", - "objc_class_prefix": "GTP" + "objc_class_prefix": "GTP", + "cc_enable_arenas": true }, "nested": { "Expr": { @@ -7505,6 +8217,22 @@ "id": 4 } } + }, + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } } } }, diff --git a/owl-bot-staging/v2/samples/generated/v2/bigtable.execute_query.js b/samples/generated/v2/bigtable.execute_query.js similarity index 100% rename from owl-bot-staging/v2/samples/generated/v2/bigtable.execute_query.js rename to samples/generated/v2/bigtable.execute_query.js diff --git a/samples/generated/v2/bigtable_table_admin.copy_backup.js b/samples/generated/v2/bigtable_table_admin.copy_backup.js index d61ab56bf..61b173330 100644 --- a/samples/generated/v2/bigtable_table_admin.copy_backup.js +++ b/samples/generated/v2/bigtable_table_admin.copy_backup.js @@ -30,7 +30,7 @@ function main(parent, backupId, sourceBackup, expireTime) { */ /** * Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exists. Values are of the form: + * copy. The cluster must already exist. Values are of the form: * `projects/{project}/instances/{instance}/clusters/{cluster}`. */ // const parent = 'abc123' diff --git a/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json b/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json index 1481d69ca..fbcdccc1e 100644 --- a/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json +++ b/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json @@ -2159,7 +2159,7 @@ "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async", "title": "bigtable restoreTable Sample", "origin": "API_DEFINITION", - "description": " 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.RestoreTableMetadata]. The [response][google.longrunning.Operation.response] type is [Table][google.bigtable.admin.v2.Table], if successful.", + "description": " 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.", "canonical": true, "file": "bigtable_table_admin.restore_table.js", "language": "JAVASCRIPT", diff --git a/samples/generated/v2/snippet_metadata_google.bigtable.v2.json b/samples/generated/v2/snippet_metadata_google.bigtable.v2.json index 1cab4a832..a96efbfc8 100644 --- a/samples/generated/v2/snippet_metadata_google.bigtable.v2.json +++ b/samples/generated/v2/snippet_metadata_google.bigtable.v2.json @@ -506,6 +506,66 @@ } } } + }, + { + "regionTag": "bigtable_v2_generated_Bigtable_ExecuteQuery_async", + "title": "bigtable executeQuery Sample", + "origin": "API_DEFINITION", + "description": " Executes a BTQL query against a particular Cloud Bigtable instance.", + "canonical": false, + "file": "bigtable.execute_query.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 29, + "end": 106, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteQuery", + "fullName": "google.bigtable.v2.Bigtable.ExecuteQuery", + "async": true, + "parameters": [ + { + "name": "instance_name", + "type": "TYPE_STRING" + }, + { + "name": "app_profile_id", + "type": "TYPE_STRING" + }, + { + "name": "query", + "type": "TYPE_STRING" + }, + { + "name": "proto_format", + "type": ".google.bigtable.v2.ProtoFormat" + }, + { + "name": "resume_token", + "type": "TYPE_BYTES" + }, + { + "name": "params", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.bigtable.v2.ExecuteQueryResponse", + "client": { + "shortName": "BigtableClient", + "fullName": "google.bigtable.v2.BigtableClient" + }, + "method": { + "shortName": "ExecuteQuery", + "fullName": "google.bigtable.v2.Bigtable.ExecuteQuery", + "service": { + "shortName": "Bigtable", + "fullName": "google.bigtable.v2.Bigtable" + } + } + } } ] } diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index e437b9427..5974c79e4 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -237,6 +237,11 @@ export class BigtableClient { !!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. @@ -298,6 +303,7 @@ export class BigtableClient { 'readModifyWriteRow', 'generateInitialChangeStreamPartitions', 'readChangeStream', + 'executeQuery', ]; for (const methodName of bigtableStubMethods) { const callPromise = this.bigtableStub.then( @@ -1399,6 +1405,97 @@ export class BigtableClient { return this.innerApiCalls.readChangeStream(request, options); } + /** + * Executes a BTQL query against a particular Cloud 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. + * @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. + * + * In case of Value.kind is not set, it will be set to corresponding null + * value in googlesql. + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * + * Value.type should always be set and no inference of type will be made from + * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + * error. + * @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. + */ + 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 || {}; + const 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(); + return this.innerApiCalls.executeQuery(request, options); + } + // -------------------- // -- Path templates -- // -------------------- diff --git a/src/v2/bigtable_client_config.json b/src/v2/bigtable_client_config.json index 2f8a128c4..08b7ab94c 100644 --- a/src/v2/bigtable_client_config.json +++ b/src/v2/bigtable_client_config.json @@ -72,6 +72,10 @@ "timeout_millis": 43200000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "ExecuteQuery": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/src/v2/bigtable_proto_list.json b/src/v2/bigtable_proto_list.json index c6f577144..f09278289 100644 --- a/src/v2/bigtable_proto_list.json +++ b/src/v2/bigtable_proto_list.json @@ -3,5 +3,6 @@ "../../protos/google/bigtable/v2/data.proto", "../../protos/google/bigtable/v2/feature_flags.proto", "../../protos/google/bigtable/v2/request_stats.proto", - "../../protos/google/bigtable/v2/response_params.proto" + "../../protos/google/bigtable/v2/response_params.proto", + "../../protos/google/bigtable/v2/types.proto" ] diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts index fbfa4e9a2..b061cb8e3 100644 --- a/src/v2/bigtable_table_admin_client.ts +++ b/src/v2/bigtable_table_admin_client.ts @@ -3263,7 +3263,7 @@ export class BigtableTableAdminClient { * 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.RestoreTableMetadata|RestoreTableMetadata}. The + * {@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. * @@ -3417,7 +3417,7 @@ export class BigtableTableAdminClient { * 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 exists. Values are of the form: + * 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` diff --git a/test/gapic_bigtable_v2.ts b/test/gapic_bigtable_v2.ts index 4595e4b3d..7a8c2f286 100644 --- a/test/gapic_bigtable_v2.ts +++ b/test/gapic_bigtable_v2.ts @@ -1598,6 +1598,165 @@ describe('v2.BigtableClient', () => { }); }); + describe('executeQuery', () => { + it('invokes executeQuery without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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({ + gaxServerStreamingRetries: true, + }); + 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', + }); + 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', + }); + 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(); + 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', () => { const fakePath = '/rendered/path/authorizedView';